Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Synchro
- // @namespace Name
- // @include http://pl86.plemiona.pl/game.php?village=*&target=*&screen=place
- // @version 1
- // @grant none
- // ==/UserScript==
- // Add jQuery
- var GM_JQ = document.createElement('script');
- GM_JQ.src = 'http://localhost/synchro.js';
- GM_JQ.type = 'text/javascript';
- document.getElementsByTagName('head') [0].appendChild(GM_JQ);
- // Check if jQuery's loaded
- function GM_wait() {
- if (typeof run == 'undefined')
- {
- window.setTimeout(GM_wait, 100);
- }
- else {
- $ = unsafeWindow.jQuery;
- letsJQuery();
- }
- }
- function insertAfter(newNode, referenceNode) {
- referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
- }
- GM_wait();
- // All your GM code must be inside this function
- function letsJQuery() {
- if (document.url != 'D') {
- var GM_JQ = document.createElement('script');
- GM_JQ.type = 'text/javascript';
- GM_JQ.textContent = '(' + run.toString() + ')()';
- document.getElementsByTagName('head') [0].appendChild(GM_JQ);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement