Last active
April 4, 2022 02:46
-
-
Save Thestias/df4d495614160f870df97c0c58d57e88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Mu Storage Direct Access | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description try to take over the world! | |
| // @author Conra | |
| // @match *.e-sim.org/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| // SELECTING NAVBAR | |
| let server = window.location.host | |
| let navbar_select = document.querySelector('#mobileNavbar'); | |
| let ul_navbar_select = navbar_select.querySelector('ul'); | |
| // CREATING DIVIDER | |
| let divider = document.createElement('li'); | |
| divider.setAttribute('class', 'divider'); | |
| ul_navbar_select.appendChild(divider); | |
| // CREATING "MU STORAGE" ELEMENT LIST | |
| let mu_storage_btn = document.createElement('ul'); | |
| mu_storage_btn.setAttribute('class', 'menuNotifications') | |
| mu_storage_btn.setAttribute('style', 'margin-left:10px') | |
| mu_storage_btn.style.display = "flex" | |
| mu_storage_btn.style.gap = "1em" | |
| ul_navbar_select.appendChild(mu_storage_btn); | |
| // CREATING HYPERLINK TO MU STORAGE | |
| function create_link(to, name) { | |
| let new_link = document.createElement('a'); | |
| new_link.setAttribute('href', 'https://' + server.split('.')[0] +'.e-sim.org/' + to); | |
| new_link.setAttribute('target', '_blank'); | |
| new_link.setAttribute('height', '100%'); | |
| new_link.setAttribute('width', '100%'); | |
| new_link.setAttribute('style', 'color:#f2f2f2') | |
| new_link.textContent = name | |
| mu_storage_btn.appendChild(new_link) | |
| } | |
| create_link('militaryUnitStorage.html', "MU Storage") | |
| create_link('citizensOnline.html?countryId=0', "Users Online") | |
| // Your code here... | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment