sABER-Click shortlink helper

Script de uso personal, adicional para pasar acortadores. Contribuciones via FaucetPay User: Crypto4Script. Try to take over the world!

当前为 2023-12-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name sABER-Click shortlink helper
  3. // @namespace Violentmonkey Scripts
  4. // @match *://blog.cryptowidgets.net/*
  5. // @match *://blog.insurancegold.in/*
  6. // @match *://blog.wiki-topia.com/*
  7. // @match *://blog.freeoseocheck.com/*
  8. // @match *://blog.coinsvalue.net/*
  9. // @match *://blog.cookinguide.net/*
  10. // @match *://blog.makeupguide.net/*
  11. // @match *://blog.carstopia.net/*
  12. // @match *://blog.carsmania.net/*
  13.  
  14. // @match *://mdn.lol/*
  15. // @match *://awgrow.com/*
  16. // @match *://worldtanr.xyz/*
  17. // @match *://fadedfeet.com/*
  18. // @match *://kenzo-flowertag.com/*
  19. // @match *://homeculina.com/*
  20. // @match *://lawyex.co/*
  21.  
  22. // @match *://rsinsuranceinfo.com/*
  23. // @match *://rssoftwareinfo.com/*
  24. // @match *://rsfinanceinfo.com/*
  25. // @match *://rseducationinfo.com/*
  26. // @match *://rsadnetworkinfo.com/*
  27. // @match *://rshostinginfo.com/*
  28.  
  29. // @grant none
  30. // @version 1.9
  31. // @author sABER (juansi)
  32. // @description Script de uso personal, adicional para pasar acortadores. Contribuciones via FaucetPay User: Crypto4Script. Try to take over the world!
  33. // @run-at document-start
  34. // ==/UserScript==
  35.  
  36. (function() { 'use strict';
  37.  
  38. function getElement(selector) {
  39. return document.querySelector(selector);
  40. }
  41.  
  42. function existElement(selector) {
  43. return getElement(selector) !== null;
  44. }
  45.  
  46. function formSubmit(selector, time) {
  47. let elem = (typeof selector === 'string') ? getElement(selector).closest('form') : selector;
  48. window.setTimeout(()=>{
  49. elem.submit();
  50. }, time * 1000);
  51. }
  52.  
  53. function setCaptchaVisible(captcha){
  54. var $div = $(captcha).parents('div');
  55. for (var i = 0; i<$div.length; i++){
  56. if ($div[i].style.display === 'none') {
  57. $div[i].style.display = 'block';
  58. }
  59. }
  60. }
  61.  
  62. function iconCaptcha(selector){
  63. let t = setInterval(()=>{
  64. setCaptchaVisible('.iconcaptcha-modal');
  65. let f = getElement(".iconcaptcha-holder.iconcaptcha-theme-light.iconcaptcha-success");
  66. if (f) { formSubmit(selector, 1);
  67. clearInterval(t);
  68. }
  69. }, 3000);
  70. }
  71.  
  72. function changeTitle(text){
  73. document.title = text;
  74. window.setTimeout(()=>{
  75. changeTitle(text.substr(1) + text.substr(0, 1));
  76. }, 200);
  77. }
  78.  
  79. function invoke(selector, time){
  80. if (existElement('.g-recaptcha')) {
  81. changeTitle(' Solve reCaptcha ');
  82. let t = window.setInterval(()=> {
  83. if (window.grecaptcha.getResponse().length !==0) {
  84. formSubmit('.g-recaptcha', 1);
  85. clearInterval(t);
  86. }
  87. }, 1000);
  88. }
  89. else if (existElement('input[name=_iconcaptcha-token]')) {
  90. changeTitle(' Solve iconCaptcha ');
  91. iconCaptcha(selector);
  92. }
  93. else {
  94. formSubmit(selector, time);
  95. }
  96. }
  97.  
  98. function disable_timers(string2find, nameFunc){
  99. var target = window[nameFunc];
  100. window[nameFunc] = function(...args){
  101. const stringFunc = String(args);
  102. if ((new RegExp(string2find)).test(stringFunc)) args[0] = function(){};
  103. return target.call(this, ...args);
  104. }
  105. }
  106.  
  107. function getForm(familyName){
  108. var forms = document.forms;
  109. for (var i = 0; i < forms.length; i++) {
  110. if (familyName === 'clks'){ var form = forms[i].innerHTML;
  111. if (form.includes('btn-')) {
  112. return forms[i];
  113. }
  114. }
  115. else if (familyName === 'rssh') {
  116. var bait = forms[i].action;
  117. if (/bypass.html|adblock.html/.test(bait)) continue;
  118. return forms[i];
  119. }
  120. else { return;
  121. }
  122. }
  123. }
  124.  
  125. Object.defineProperty(document, 'querySelector', { value: document.querySelector, configurable: false, writable: false });
  126. Object.defineProperty(HTMLFormElement.prototype, 'submit', { writable: false });
  127. disable_timers('(/ad-now.php|/bypass|Solve reCaptcha)', 'setInterval');
  128. disable_timers('(bl0ck3d|Solve reCaptcha|isRequestPresent|repeat)', 'setTimeout');
  129.  
  130. var l = new URL(window.location.href);
  131. switch (l.hostname) {
  132. case 'blog.cryptowidgets.net': case 'blog.insurancegold.in': case 'blog.wiki-topia.com':
  133. case 'blog.freeoseocheck.com': case 'blog.coinsvalue.net': case 'blog.cookinguide.net':
  134. case 'blog.makeupguide.net': case 'blog.carstopia.net': case 'blog.carsmania.net':
  135. document.addEventListener('DOMContentLoaded', function() {
  136. document.querySelectorAll('.row.text-center').forEach((dtc) => dtc.parentNode.removeChild(dtc));
  137. invoke('#countdown', 20);
  138. });
  139. break;
  140. case 'worldtanr.xyz': case 'awgrow.com': case 'fadedfeet.com':
  141. case 'kenzo-flowertag.com': case 'homeculina.com': case 'lawyex.co':
  142. case 'mdn.lol':
  143. document.addEventListener('DOMContentLoaded', function() {
  144. invoke(getForm('clks'), 10);
  145. });
  146. break;
  147. case 'rsinsuranceinfo.com': case 'rssoftwareinfo.com': case 'rsfinanceinfo.com':
  148. case 'rseducationinfo.com': case 'rsadnetworkinfo.com': case 'rshostinginfo.com':
  149. document.addEventListener('DOMContentLoaded', function() {
  150. invoke(getForm('rssh'), 5);
  151. });
  152. break;
  153. default:
  154. break;
  155. }
  156. })();