Skip to content

Instantly share code, notes, and snippets.

@hcarver
Created March 7, 2023 20:45
Show Gist options
  • Save hcarver/ee1774e1404348be1d4f276b1795a7a4 to your computer and use it in GitHub Desktop.
Save hcarver/ee1774e1404348be1d4f276b1795a7a4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Slothninja Indonesia Autorefresh
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.slothninja.com/indonesia/game/show/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=slothninja.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout( () => {
const userName = document.getElementsByClassName('greeting')[0].children[0].innerText;
if (document.getElementsByClassName('current-players')[0].innerText.indexOf(userName) < 0) {
window.location.reload();
}
}, 2000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment