Shurukn / Shurukn Expeditions

// ==UserScript==
// @name                Shurukn Expeditions
// @namespace        https://www.shark-aries.online
// @version             7.777
// @icon                   https://i.ibb.co/8zqxgT6/Ogame-Iphone01a.png
// @description        Send expeditions in Ogame.fr
// @updateURL https://openuserjs.org/meta/Shurukn/Shurukn_Expeditions.meta.js
// @downloadURL https://openuserjs.org/install/Shurukn/Shurukn_Expeditions.user.js
// @copyright 2023, Shurukn (https://openuserjs.org/users/Shurukn)
// @author         Shurukn
// @match          https://s256-fr.ogame.gameforge.com/game/*
// @license         MIT
// @run-at          document-idle
// ==/UserScript==

    'use strict';

function GM_config() { 

GM_config.init ({
        id: 'shurukn',
        title: 'shurukn expeditions',
            onInit: {
                label: 'on Init',
                type: 'function',
                default: function GM_onInit() {
            console.log('GM_config is initialized');
            },
            onOpen: {
                label: 'on Open',
                type: 'function',
                default: function GM_onOpen() {
            console.log('GM_config is opened');
        },
            },
            onSave: {
                label: 'on Save',
                type: 'function',
                default: function GM_onSave() {
            console.log('GM_config is saved');
        },
            },
            onClose: {
                label: 'on Close',
                type: 'function',
                default: function GM_onClose() {
            console.log('GM_config is closed');
        },
            },
            onReset: {
                label: 'on Reset',
                type: 'function',
                default: function GM_onReset() {
                console.log('GM_config is reset');
            },
           },
              events: {
            save: function GM_Save() {
                console.log('Configuration saved');
            },
        },
    },
});

  document.addEventListener('F8', function(event) {
    if (event.key === 'F8') {
        event.preventDefault();
        GM_config.open();
    }
});

         GM_registerMenuCommand('Configure', function menu() {
         GM_config.open();
});


          if (document.addEventListener("DOMContentLoaded")) {
        addButton();
          }

    function addButton() {
        const find = document.querySelector('#fleet1');
            if (find) {
            const expeditions = document.createElement('div');
                expeditions.id = 'expeditions';
                expeditions.className = 'continue';
                expeditions.classList.add('fleet123')
            const shurukn = document.createTextNode('https://justpaste.it/shurukn');
                expeditions.appendChild(shurukn);
                document.body.appendChild(expeditions);
            const expeditionsSpan = document.createElement('span');
                expeditionsSpan.textContent = 'send';
                expeditions.appendChild(expeditions);
            }    
     }
}