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

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