Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name rss clicker
- // @include https://rsadnetworkinfo.com/*
- // @include https://rssoftwareinfo.com/*
- // @include https://rsinsuranceinfo.com/*
- // @include https://rshostinginfo.com/*
- // @include https://rseducationinfo.com/*
- // @include https://rsfinanceinfo.com/*
- // @grant GM_addStyle
- // @run-at document-start
- // ==/UserScript==
- (function () {
- "use strict";
- function getElement(selector) {
- return document.querySelector(selector);
- }
- function waitAndClick(selector, timeout) {
- setTimeout(function() {
- getElement(selector).click();
- }, timeout);
- }
- function removeAdbWall() {
- let adb = getElement('img[alt="CHP Adblock Icon"]');
- if (adb) {
- adb = adb.closest('div[class]').className;
- adb = 'div[id^="'.concat(adb.substring(0, 10), '"]');
- getElement(adb).remove();
- }
- }
- // Unhide the button and captcha
- GM_addStyle( `
- div {
- display: block !important;
- } `
- );
- // End of Unhide
- var script = document.createElement('script');
- script.textContent = 'document.superListener = document.addEventListener;\
- document.addEventListener = function(type, listener, useCapture) {\
- if(type != "contextmenu")\
- document.superListener(type, listener, !!useCapture);\
- };';
- script.async = false
- document.head.insertBefore(script, document.head.firstChild)
- // document.querySelectorAll("script")[2].remove();
- // Clicker. After 2 sec, if captcha on page,
- // waiting for the captcha to be solved and click button.
- // Otherwise, press the button after 3 seconds
- setTimeout(function() {
- if (getElement('.iconcaptcha-modal')) {
- removeAdbWall();
- getElement(".iconcaptcha-modal__body-circle").click();
- let interval = setInterval( () => {
- let solved = getElement(".iconcaptcha-modal__body-checkmark");
- if (solved) {
- waitAndClick('div > button', 0);
- clearInterval(interval);
- }}, 3000);
- }
- else {
- waitAndClick('div > button', 3000);
- }
- }, 2000);
- // End of Clicker
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement