Skip to content

Instantly share code, notes, and snippets.

@Thestias
Created November 3, 2020 14:21
Show Gist options
  • Save Thestias/272f3ef5e03434f4bbe69008f83da104 to your computer and use it in GitHub Desktop.
Save Thestias/272f3ef5e03434f4bbe69008f83da104 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name e-sim Battles Url Changer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *.e-sim.org/*
// @grant none
// ==/UserScript==
(function() {
let battles_d = document.querySelectorAll('.has-dropdown');
let server = window.location.host.split('.')[0]
battles_d[4].querySelectorAll('li')[1].querySelector('a').setAttribute('href', '/battles.html?countryId=-1&sorting=BY_TOTAL_DAMAGE&filter=NONE')
// battles_d[4].querySelectorAll('li')[1].querySelector('a').href = protocol + '://' + server + '.e-sim.org/battles.html?countryId=-1&sorting=BY_TOTAL_DAMAGE&filter=NONE';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment