From 926240fc6c5e1c23ab376658184bf2f62972b46d Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Tue, 22 Oct 2024 00:24:45 +0200 Subject: [PATCH] added bypass for spaste from pahe https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/77 --- Bypass_All_Shortlinks.meta.js | 3 ++- Bypass_All_Shortlinks.user.js | 25 ++++++++++++++++++++++++- extra_bypasses/extra_bypasses.user.js | 23 +++++++++++++++++++++++ supported_sites.txt | 1 + 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index f71cbf7..c827074 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.36 +// @version 92.8.37 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -751,6 +751,7 @@ // @include /golink.bloggerishyt.in/ // @include /skillheadlines.in/ // @include /psccapk.in|secure.bgmiupdate.com.in/ +// @include /www.spaste.com/ // @include /filecrypt.(cc|co)/ // @include /(mega-enlace|acortados).com/ // @include /^(https?:\/\/)(.+)?((actualpost|americanstylo|beautifulfashionnailart|dadinthemaking|glowandglamcorner|listofthis|lobirtech|travelperi|vepiv|seydisehirmansethaber|turkiyertg|tophotelsukraine).com|(makego|sakazi).net|askerlikforum.com.tr)(\/.*)/ diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 47d86b1..e45c737 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.36 +// @version 92.8.37 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -751,6 +751,7 @@ // @include /golink.bloggerishyt.in/ // @include /skillheadlines.in/ // @include /psccapk.in|secure.bgmiupdate.com.in/ +// @include /www.spaste.com/ // @include /filecrypt.(cc|co)/ // @include /(mega-enlace|acortados).com/ // @include /^(https?:\/\/)(.+)?((actualpost|americanstylo|beautifulfashionnailart|dadinthemaking|glowandglamcorner|listofthis|lobirtech|travelperi|vepiv|seydisehirmansethaber|turkiyertg|tophotelsukraine).com|(makego|sakazi).net|askerlikforum.com.tr)(\/.*)/ @@ -2585,6 +2586,28 @@ // https://f.technicalatg.in/6iTpuM1 - https://github.com/uBlockOrigin/uAssets/discussions/17361#discussioncomment-10954732 /skillheadlines.in/.test(url) ? afterDOMLoaded(function() { redirect(atob(document.querySelector('#wpsafe-link > a:nth-child(1)').getAttribute('onclick').match(/'(https:\/\/[^']+)'/)[1].split('safelink_redirect=')[1]).match(/"safelink":"(.*?)"/)[1]);}) : null; + // spaste.com use in pahe.ink - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/77 + function checkHCaptchaSolved() { + if (document.querySelector('.h-captcha')) { + return window.hcaptcha.getResponse().length !== 0; + } + return true; + } + function clickIfHCaptchaSolved(selector) { + let intervalId = setInterval(() => { + if (checkHCaptchaSolved()) { + clearInterval(intervalId); + document.querySelector(selector).click(); + } + }, 1000); + } + /www.spaste.com\/site\/checkPasteUrl\?c=/.test(url) ? afterDOMLoaded(function() { + clickIfHCaptchaSolved('#template-contactform-submit'); + } ) : null; + /www.spaste.com\/p\?c=/.test(url) ? afterDOMLoaded(function() { + redirectIfExists('#template-contactform-message > a:nth-child(3)'); + }) : null; + })(); (function() { diff --git a/extra_bypasses/extra_bypasses.user.js b/extra_bypasses/extra_bypasses.user.js index 94d071e..4ef6692 100644 --- a/extra_bypasses/extra_bypasses.user.js +++ b/extra_bypasses/extra_bypasses.user.js @@ -196,6 +196,7 @@ // @include /golink.bloggerishyt.in/ // @include /skillheadlines.in/ // @include /psccapk.in|secure.bgmiupdate.com.in/ +// @include /www.spaste.com/ // @run-at document-start // ==/UserScript== @@ -1034,6 +1035,28 @@ // https://f.technicalatg.in/6iTpuM1 - https://github.com/uBlockOrigin/uAssets/discussions/17361#discussioncomment-10954732 /skillheadlines.in/.test(url) ? afterDOMLoaded(function() { redirect(atob(document.querySelector('#wpsafe-link > a:nth-child(1)').getAttribute('onclick').match(/'(https:\/\/[^']+)'/)[1].split('safelink_redirect=')[1]).match(/"safelink":"(.*?)"/)[1]);}) : null; + // spaste.com use in pahe.ink - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/77 + function checkHCaptchaSolved() { + if (document.querySelector('.h-captcha')) { + return window.hcaptcha.getResponse().length !== 0; + } + return true; + } + function clickIfHCaptchaSolved(selector) { + let intervalId = setInterval(() => { + if (checkHCaptchaSolved()) { + clearInterval(intervalId); + document.querySelector(selector).click(); + } + }, 1000); + } + /www.spaste.com\/site\/checkPasteUrl\?c=/.test(url) ? afterDOMLoaded(function() { + clickIfHCaptchaSolved('#template-contactform-submit'); + } ) : null; + /www.spaste.com\/p\?c=/.test(url) ? afterDOMLoaded(function() { + redirectIfExists('#template-contactform-message > a:nth-child(3)'); + }) : null; + })(); (function() { diff --git a/supported_sites.txt b/supported_sites.txt index 52e7003..b39c74e 100644 --- a/supported_sites.txt +++ b/supported_sites.txt @@ -732,6 +732,7 @@ https://paster.so/* /golink.bloggerishyt.in/ /skillheadlines.in/ /psccapk.in|secure.bgmiupdate.com.in/ +/www.spaste.com/ /filecrypt.(cc|co)/ /(mega-enlace|acortados).com/ /^(https?:\/\/)(.+)?((actualpost|americanstylo|beautifulfashionnailart|dadinthemaking|glowandglamcorner|listofthis|lobirtech|travelperi|vepiv|seydisehirmansethaber|turkiyertg|tophotelsukraine).com|(makego|sakazi).net|askerlikforum.com.tr)(\/.*)/