diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index b96763e..8e6083c 100644 --- a/Bypass_All_Shortlinks.meta.js +++ b/Bypass_All_Shortlinks.meta.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 91.8.11 +// @version 91.8.12 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -775,6 +775,7 @@ // @include /filecrypt.(cc|co)/ // @include /(loot-link.com|loot-links.com|lootlink.org|lootlinks.co|lootdest.(info|org|com)|links-loot.com|linksloot.net)\/s\?.*$/ // @include /mega-enlace.com/ +// @include /^(https?:\/\/)(.+)?(tiktokcounter.net)(\/.*)/ // @include /(work.ink|workink.click)\/.*$/ // @resource NOTYF_CSS https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css // @require https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 17a52e6..9ea9de8 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 91.8.11 +// @version 91.8.12 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -775,6 +775,7 @@ // @include /filecrypt.(cc|co)/ // @include /(loot-link.com|loot-links.com|lootlink.org|lootlinks.co|lootdest.(info|org|com)|links-loot.com|linksloot.net)\/s\?.*$/ // @include /mega-enlace.com/ +// @include /^(https?:\/\/)(.+)?(tiktokcounter.net)(\/.*)/ // @include /(work.ink|workink.click)\/.*$/ // @resource NOTYF_CSS https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css // @require https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js @@ -2680,6 +2681,140 @@ // ----- ----- ----- +//----tiktokcounter auto-skip for firefox only-------- +(function() { + 'use strict'; + if (/tiktokcounter.net/.test(window.location.href) && navigator.userAgent.indexOf("Firefox") != -1) { + //---DEFINE FUNCTIONS--- + + function ReadytoClick(selector, sleepTime = 0) { + const events = ["mouseover", "mousedown", "mouseup", "click"]; + const selectors = selector.split(', '); + if (selectors.length > 1) { + return selectors.forEach(ReadytoClick); + } + if (sleepTime > 0) { + return sleep(sleepTime * 1000).then(function() { + ReadytoClick(selector, 0); + }); + } + elementReady(selector).then(function(element) { + element.removeAttribute('disabled'); + element.removeAttribute('target'); + events.forEach(eventName => { + const eventObject = new MouseEvent(eventName, { + bubbles: true + }); + element.dispatchEvent(eventObject); + }); + }); + } + + function elementReady(selector) { + return new Promise(function(resolve, reject) { + let element = document.querySelector(selector); + if (element) { + resolve(element); + return; + } + new MutationObserver(function(_, observer) { + element = document.querySelector(selector); + if (element) { + resolve(element); + observer.disconnect(); + } + }).observe(document.documentElement, { + childList: true, + subtree: true + }); + }); + } + + function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + function preventForcedFocusOnWindow() { + window.mouseleave = true; + window.onmouseover = true; + document.hasFocus = function() { + return true; + }; + Object.defineProperty(document, 'webkitVisibilityState', { + get() { + return 'visible'; + } + }); + Object.defineProperty(document, 'visibilityState', { + get() { + return 'visible'; + } + }); + window.addEventListener('visibilitychange', function(e) { + e.stopImmediatePropagation(); + }, true, true); + window.addEventListener('focus', onfocus, true); + document.addEventListener('visibilitychange', function(e) { + e.stopImmediatePropagation(); + }, true, true); + Object.defineProperty(document, 'hidden', { + get() { + return false; + } + }); + }; + + function captchaIsSolved() { + if (document.querySelector('.h-captcha')) { + return window.hcaptcha.getResponse().length !== 0; + } else if (document.querySelector('.cf-turnstile') || document.querySelector('#captcha-turnstile')) { + return window.turnstile.getResponse().length !== 0; + } else if (document.querySelector('.g-recaptcha') || document.querySelector('#captchaShortlink') || document.querySelector('#captcha_container') || document.querySelector('#captchaShortlinker')) { + return window.grecaptcha.getResponse().length !== 0; + } + } + + //---EXECUTE + + if (/tiktokcounter.net/.test(window.location.href)) { + preventForcedFocusOnWindow(); + } + + document.addEventListener('DOMContentLoaded', function() { + //window.addEventListener('load', function() { + + if (/tiktokcounter.net/.test(window.location.href)) { + + // Skip timer + setInterval(function(){window.wT9882=0;},1000); + + // Auto click buttons + if (navigator.userAgent.indexOf("Firefox") != -1) { + if (document.querySelector('.h-captcha')) { + let ctrsh = setInterval(() => { + if (captchaIsSolved()) { + clearInterval(ctrsh); + ReadytoClick('#cbt', 1); + } + }, 1 * 1000); + } else { + let profitsfly = setInterval(() => { + if (document.querySelector('#cbt').innerText == 'Continue') { + clearInterval(profitsfly); + ReadytoClick('#cbt', 2); + } + }, 2 * 1000); + } + } + } + + }) + + } + +})(); +//-------------------------------- + // ----- Bypass work.ink ---- original script by lem6ns: https://greasyfork.org/en/scripts/463481-work-ink-bypasser (function() { 'use strict'; diff --git a/extra_bypasses/tiktokcounter_firefox.js b/extra_bypasses/tiktokcounter_firefox.js new file mode 100644 index 0000000..7ee9595 --- /dev/null +++ b/extra_bypasses/tiktokcounter_firefox.js @@ -0,0 +1,139 @@ +// ==UserScript== +// @name tiktokcounter firefox auto-skip +// @include /^(https?:\/\/)(.+)?(tiktokcounter.net)(\/.*)/ +// @run-at document-start +// ==/UserScript== + +//----tiktokcounter auto-skip for firefox only-------- +(function() { + 'use strict'; + if (/tiktokcounter.net/.test(window.location.href) && navigator.userAgent.indexOf("Firefox") != -1) { + //---DEFINE FUNCTIONS--- + + function ReadytoClick(selector, sleepTime = 0) { + const events = ["mouseover", "mousedown", "mouseup", "click"]; + const selectors = selector.split(', '); + if (selectors.length > 1) { + return selectors.forEach(ReadytoClick); + } + if (sleepTime > 0) { + return sleep(sleepTime * 1000).then(function() { + ReadytoClick(selector, 0); + }); + } + elementReady(selector).then(function(element) { + element.removeAttribute('disabled'); + element.removeAttribute('target'); + events.forEach(eventName => { + const eventObject = new MouseEvent(eventName, { + bubbles: true + }); + element.dispatchEvent(eventObject); + }); + }); + } + + function elementReady(selector) { + return new Promise(function(resolve, reject) { + let element = document.querySelector(selector); + if (element) { + resolve(element); + return; + } + new MutationObserver(function(_, observer) { + element = document.querySelector(selector); + if (element) { + resolve(element); + observer.disconnect(); + } + }).observe(document.documentElement, { + childList: true, + subtree: true + }); + }); + } + + function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + function preventForcedFocusOnWindow() { + window.mouseleave = true; + window.onmouseover = true; + document.hasFocus = function() { + return true; + }; + Object.defineProperty(document, 'webkitVisibilityState', { + get() { + return 'visible'; + } + }); + Object.defineProperty(document, 'visibilityState', { + get() { + return 'visible'; + } + }); + window.addEventListener('visibilitychange', function(e) { + e.stopImmediatePropagation(); + }, true, true); + window.addEventListener('focus', onfocus, true); + document.addEventListener('visibilitychange', function(e) { + e.stopImmediatePropagation(); + }, true, true); + Object.defineProperty(document, 'hidden', { + get() { + return false; + } + }); + }; + + function captchaIsSolved() { + if (document.querySelector('.h-captcha')) { + return window.hcaptcha.getResponse().length !== 0; + } else if (document.querySelector('.cf-turnstile') || document.querySelector('#captcha-turnstile')) { + return window.turnstile.getResponse().length !== 0; + } else if (document.querySelector('.g-recaptcha') || document.querySelector('#captchaShortlink') || document.querySelector('#captcha_container') || document.querySelector('#captchaShortlinker')) { + return window.grecaptcha.getResponse().length !== 0; + } + } + + //---EXECUTE + + if (/tiktokcounter.net/.test(window.location.href)) { + preventForcedFocusOnWindow(); + } + + document.addEventListener('DOMContentLoaded', function() { + //window.addEventListener('load', function() { + + if (/tiktokcounter.net/.test(window.location.href)) { + + // Skip timer + setInterval(function(){window.wT9882=0;},1000); + + // Auto click buttons + if (navigator.userAgent.indexOf("Firefox") != -1) { + if (document.querySelector('.h-captcha')) { + let ctrsh = setInterval(() => { + if (captchaIsSolved()) { + clearInterval(ctrsh); + ReadytoClick('#cbt', 1); + } + }, 1 * 1000); + } else { + let profitsfly = setInterval(() => { + if (document.querySelector('#cbt').innerText == 'Continue') { + clearInterval(profitsfly); + ReadytoClick('#cbt', 2); + } + }, 2 * 1000); + } + } + } + + }) + + } + +})(); +//-------------------------------- diff --git a/supported_sites.txt b/supported_sites.txt index 507bed6..428cd04 100644 --- a/supported_sites.txt +++ b/supported_sites.txt @@ -754,4 +754,5 @@ r1.foxylinks.site /filecrypt.(cc|co)/ /(loot-link.com|loot-links.com|lootlink.org|lootlinks.co|lootdest.(info|org|com)|links-loot.com|linksloot.net)\/s\?.*$/ /mega-enlace.com/ +/^(https?:\/\/)(.+)?(tiktokcounter.net)(\/.*)/ /(work.ink|workink.click)\/.*$/