DotDReloader

Reloads game or chat individually. Requires Mutik to be installed first.

  1. // ==UserScript==
  2. // @name DotDReloader
  3. // @description Reloads game or chat individually. Requires Mutik to be installed first.
  4. // @namespace tag://kongregate
  5. // @author Anarcho
  6. // @version 1.1.50
  7. // @grant GM_xmlhttpRequest
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // @grant unsafeWindow
  11. // @include http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons*
  12. // @include *50.18.191.15/kong/?DO_NOT_SHARE_THIS_LINK*
  13. // @hompage http://www.dotdraids.pl
  14. // ==/UserScript==
  15.  
  16. if (window.location.host == "www.kongregate.com") {
  17. function main() {
  18. window.DotDReloader = {
  19. gui: {
  20. load: function() {
  21. console.log('[DotDReloader] Initializing GUI ' + window.SRDotDX);
  22. if ($("hideWCtxt") !== null) {
  23. window.SRDotDX.c('li').set({
  24. class: 'rate'
  25. }).html('<a class="spritegame" href="#" onclick="DotDReloader.reloadChat(); return false;">Reload Chat</a>', false).attach('after', 'quicklinks_favorite_block');
  26. window.SRDotDX.c('li').set({
  27. class: 'rate'
  28. }).html('<a class="spritegame" href="#" onclick="DotDReloader.reloadGame(); return false;">Reload Main</a>', false).attach('after', 'quicklinks_favorite_block');
  29. } else {
  30. setTimeout(DotDReloader.gui.load, 500)
  31. }
  32. },
  33. },
  34. reloadChat: function() {
  35. window.SRDotDX.util.extEcho('Reloading Chat, please wait...');
  36. window.SRDotDX.gframe('DotDReloader.chat#');
  37. },
  38. reloadGame: function() {
  39. window.SRDotDX.util.extEcho('Reloading Game, please wait...');
  40. window.SRDotDX.gframe('DotDReloader.game#');
  41. },
  42. fails: 0,
  43. load: function() {
  44. console.log('[DotDReloader] Waiting for mutik ' + window.SRDotDX + " " + window.DotDReloader);
  45. if (window.SRDotDX !== undefined) {
  46. DotDReloader.gui.load();
  47. setTimeout(function() {
  48. delete DotDReloader.load
  49. }, 100);
  50. } else if (++DotDReloader.fails < 20) {
  51. console.log('[DotDReloader] Missing needed Kong resources (try:' + DotDReloader.fails + '), retrying in 0.75 second...');
  52. setTimeout(DotDReloader.load, 750);
  53. } else {
  54. console.log('[DotDReloader] Unable to locate required Kong resources. Loading aborted');
  55. setTimeout(function() {
  56. delete DotDReloader
  57. }, 1);
  58. }
  59. }
  60. };
  61. console.log('[DotDReloader] Loading ' + window.DotDReloader);
  62. DotDReloader.load();
  63. }
  64.  
  65. console.log('[DotDReloader] Injecting in main');
  66. scr = document.createElement('script');
  67. scr.appendChild(document.createTextNode('(' + main + ')()'));
  68. document.head.appendChild(scr);
  69. } else if (window.location.host === '50.18.191.15') {
  70. window.onmessage = function(e) {
  71. var c = e.data.split('#');
  72. if (c[0].indexOf('DotDReloader') !== -1) {
  73. if (c[0].indexOf('chat') !== -1) {
  74. console.log("[DotDReloader] reloading chat ");
  75. document.getElementById('chatdiv').parentNode.innerHTML = document.getElementById('chatdiv').parentNode.innerHTML;
  76. }
  77. if (c[0].indexOf('game') !== -1) {
  78. console.log("[DotDReloader] reloading game ");
  79. document.getElementById('swfdiv').parentNode.innerHTML = document.getElementById('swfdiv').parentNode.innerHTML;
  80. }
  81. }
  82. };
  83. console.log("[DotDReloader] Injected code into GameFrame");
  84. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址