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-29 提交的版本,查看 最新版本

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