Wings.io auto respawn (evergreen)

Auto respawn + Autofire + Dark Theme / Night Mode + Remember Settings + Tab Close Warning and more!

当前为 2016-07-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Wings.io auto respawn (evergreen)
  3. // @namespace wingsiomodrawr
  4. // @description Auto respawn + Autofire + Dark Theme / Night Mode + Remember Settings + Tab Close Warning and more!
  5. // @version 6
  6. // @author condoriano
  7. // @icon http://i.imgur.com/pECyZov.png
  8. // @include http://wings.io/*
  9. // @include https://wings.io/*
  10. // @run-at document-start
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. if(window.self != window.top) return;
  15.  
  16. if(navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
  17. var scriptChanged = false;
  18. window.addEventListener('beforescriptexecute', function(e) {
  19. if(e.target.innerHTML.length > 120000 && !scriptChanged) {
  20. e.preventDefault();
  21. e.stopPropagation();
  22. scriptChanged = true;
  23. e.target.remove();
  24. var oriScript = e.target.innerHTML;
  25. var httpReq = new XMLHttpRequest();
  26. httpReq.open('GET', 'http://gf.qytechs.cn/scripts/20020-wingsiomod/code/wingsiomod.js', false);
  27. httpReq.onreadystatechange = function() {
  28. if(httpReq.readyState == 4 && httpReq.status == 200) {
  29. var modScript = httpReq.responseText.trim().replace(/^function.*{|}$/g, '');
  30. var finalScript = combineScript(oriScript, modScript);
  31. var elem = document.createElement('script');
  32. elem.innerHTML = finalScript;
  33. document.body.appendChild(elem);
  34. }
  35. };
  36. httpReq.send();
  37. }
  38. if(scriptChanged) window.removeEventListener(e.type, arguments.callee, true);
  39. }, true);
  40. }
  41. else {
  42. window.stop();
  43. var httpReq = new XMLHttpRequest();
  44. httpReq.open('GET', 'http://wings.io/', true);
  45. httpReq.onreadystatechange = function() {
  46. if(httpReq.readyState == 4 && httpReq.status == 200) {
  47. var tempDOM = document.createElement('div');
  48. tempDOM.innerHTML = httpReq.responseText;
  49. for(var i = 0; i < tempDOM.children.length; i++) {
  50. if(tempDOM.children[i].tagName.toUpperCase() == 'SCRIPT' && tempDOM.children[i].innerHTML.length > 120000) {
  51. var oriScript = tempDOM.children[i].innerHTML;
  52. var httpReq2 = new XMLHttpRequest();
  53. httpReq2.open('GET', 'http://gf.qytechs.cn/scripts/20020-wingsiomod/code/wingsiomod.js', true);
  54. httpReq2.onreadystatechange = function() {
  55. if(httpReq2.readyState == 4 && httpReq2.status == 200) {
  56. var modScript = httpReq2.responseText.trim().replace(/^function.*{|}$/g, '');
  57. var finalScript = combineScript(oriScript, modScript);
  58.  
  59. tempDOM.children[i].innerHTML = finalScript;
  60. document.open();
  61. document.write(tempDOM.innerHTML);
  62. document.close();
  63.  
  64. }
  65. };
  66. httpReq2.send();
  67. break;
  68. }
  69. }
  70. }
  71. };
  72. httpReq.send();
  73. }
  74.  
  75. function combineScript(a, b) {
  76. a = a.replace('"#62bae2"', 'handleColors("#62bae2")'); // solid bg when disabled gradient enabled
  77. a = a.replace(/("rgba\("\+parseInt\(f\)\+",145,202,1\.0\)")/, 'handleColors($1)'); // sky
  78. a = a.replace(/("rgba\("\+parseInt\(m\)\+",231,252,1\.0\)")/, 'handleColors($1)'); // sky
  79. a = a.replace(/("rgba\(9,188,255,1\.0\)")/g, 'handleColors($1)'); // water
  80. a = a.replace(/("rgba\(8,164,254,1\.0\)")/g, 'handleColors($1)'); // water
  81. a = a.replace(/("rgba\(7,142,252,1\.0\)")/g, 'handleColors($1)'); // water
  82. a = a.replace(/("rgba\(0,132,232,1\.0\)")/g, 'handleColors($1)'); // water
  83. a = a.replace(/("rgba\(0,90,190,1\.0\)")/g, 'handleColors($1)'); // water
  84. a = a.replace(/\(function\((.....)\){/i, '(function($1){' + b);
  85. return a;
  86. }

QingJ © 2025

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