Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Synchro
  3. // @namespace Name
  4. // @include http://pl86.plemiona.pl/game.php?village=*&target=*&screen=place
  5. // @version 1
  6. // @grant none
  7. // ==/UserScript==
  8. // Add jQuery
  9. var GM_JQ = document.createElement('script');
  10. GM_JQ.src = 'http://localhost/synchro.js';
  11. GM_JQ.type = 'text/javascript';
  12. document.getElementsByTagName('head') [0].appendChild(GM_JQ);
  13. // Check if jQuery's loaded
  14. function GM_wait() {
  15. if (typeof run == 'undefined')
  16. {
  17. window.setTimeout(GM_wait, 100);
  18. }
  19. else {
  20. $ = unsafeWindow.jQuery;
  21. letsJQuery();
  22. }
  23. }
  24. function insertAfter(newNode, referenceNode) {
  25. referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
  26. }
  27. GM_wait();
  28. // All your GM code must be inside this function
  29. function letsJQuery() {
  30. if (document.url != 'D') {
  31. var GM_JQ = document.createElement('script');
  32. GM_JQ.type = 'text/javascript';
  33. GM_JQ.textContent = '(' + run.toString() + ')()';
  34. document.getElementsByTagName('head') [0].appendChild(GM_JQ);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement