From a87b41bb08fb7daa2b02bc2dd1368b212345a058 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Sat, 12 Oct 2024 12:46:54 +0200 Subject: [PATCH] add autoclick for hdpastes https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/170 --- Bypass_All_Shortlinks.meta.js | 3 ++- Bypass_All_Shortlinks.user.js | 7 ++++++- extra_bypasses/extra_bypasses.user.js | 5 +++++ supported_sites.txt | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index a326a32..161dff2 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 92.8.20 +// @version 92.8.21 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -731,6 +731,7 @@ // @include /mastramstories.com\/api.php\?api/ // @include /onlinetntextbooks.com/ // @include /www.saferoms.com\/\?go=/ +// @include /hdpastes.com\/\?v=/ // @include /filecrypt.(cc|co)/ // @include /^(https?:\/\/)(?!(bypass.city|adbypass.org))(linkvertise.com|(linkvertise|link-to).net)/ // @include /(mega-enlace|acortados).com/ diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index fb0bcb8..fc43f88 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 92.8.20 +// @version 92.8.21 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -731,6 +731,7 @@ // @include /mastramstories.com\/api.php\?api/ // @include /onlinetntextbooks.com/ // @include /www.saferoms.com\/\?go=/ +// @include /hdpastes.com\/\?v=/ // @include /filecrypt.(cc|co)/ // @include /^(https?:\/\/)(?!(bypass.city|adbypass.org))(linkvertise.com|(linkvertise|link-to).net)/ // @include /(mega-enlace|acortados).com/ @@ -2382,6 +2383,10 @@ if (confirm(`Confirm to redirect to \n${dlLink.split('https://href.li/?')[1]}\n`)) {redirect(dlLink);} }) : null; + // https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/170 + const clickIfRecaptchaSolved = (selector) => { let intervalId = setInterval(() => { let button = document.querySelector(selector); if (window.grecaptcha.getResponse().length !== 0) { clearInterval(intervalId); button.click(); } }, 1000); }; + /hdpastes.com\/\?v=/.test(url) ? afterDOMLoaded(function() {clickIfRecaptchaSolved('.btn-success');}) : null; + })(); (function() { diff --git a/extra_bypasses/extra_bypasses.user.js b/extra_bypasses/extra_bypasses.user.js index 8830a40..59375e1 100644 --- a/extra_bypasses/extra_bypasses.user.js +++ b/extra_bypasses/extra_bypasses.user.js @@ -181,6 +181,7 @@ // @include /mastramstories.com\/api.php\?api/ // @include /onlinetntextbooks.com/ // @include /www.saferoms.com\/\?go=/ +// @include /hdpastes.com\/\?v=/ // @run-at document-start // ==/UserScript== @@ -890,6 +891,10 @@ if (confirm(`Confirm to redirect to \n${dlLink.split('https://href.li/?')[1]}\n`)) {redirect(dlLink);} }) : null; + // https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/170 + const clickIfRecaptchaSolved = (selector) => { let intervalId = setInterval(() => { let button = document.querySelector(selector); if (window.grecaptcha.getResponse().length !== 0) { clearInterval(intervalId); button.click(); } }, 1000); }; + /hdpastes.com\/\?v=/.test(url) ? afterDOMLoaded(function() {clickIfRecaptchaSolved('.btn-success');}) : null; + })(); (function() { diff --git a/supported_sites.txt b/supported_sites.txt index ff4b01e..aa9f250 100644 --- a/supported_sites.txt +++ b/supported_sites.txt @@ -711,6 +711,7 @@ https://paster.so/* /mastramstories.com\/api.php\?api/ /onlinetntextbooks.com/ /www.saferoms.com\/\?go=/ +/hdpastes.com\/\?v=/ /filecrypt.(cc|co)/ /^(https?:\/\/)(?!(bypass.city|adbypass.org))(linkvertise.com|(linkvertise|link-to).net)/ /(mega-enlace|acortados).com/