diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index 64e49a8..2ed3ff5 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 93.2.3 +// @version 93.2.4 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 0413bbf..d168281 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 93.2.3 +// @version 93.2.4 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -3008,10 +3008,39 @@ const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/; if (domainRegex.test(window.location.href)) { - window.addEventListener('load', function() { - let reloading = false; + // Back up the current ref url + if (window.location.href.includes("/ref.php")) { + GM_setValue("profitsflyLocation", window.location.href); + } - // Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists + window.addEventListener('load', function() { + // Check if the current URL is just the domain + const url = new URL(window.location.href); + const path = url.pathname; + if (path === "/" || path === "") { + if (document.body.textContent.includes("You have 2 active sessions.")) { + // Click the continue button if a backed up url was loaded in the last 5 seconds + if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) { + for (const button of document.querySelectorAll("button")) { + if (button.textContent.trim() === "Continue") { + button.click(); + break; + } + } + } + } else { + // Load the backed up url + const lastLocation = GM_getValue("profitsflyLocation"); + if (lastLocation) { + GM_setValue("profitsflyGoBackTime", Date.now()); + GM_setValue("profitsflyOverrideLocation", lastLocation); + window.location.href = lastLocation; + } + } + } + + // Function to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists + let reloading = false; function checkForMessage() { const paragraphs = document.getElementsByTagName("p"); for (let p of paragraphs) { @@ -3049,6 +3078,7 @@ })(); //------- + // ----- Bypass Rinku ------ // source: https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/165 // example: https://rinku.me/0XLi6 diff --git a/extra_bypasses/profitsfly_reload_helper.user.js b/extra_bypasses/profitsfly_reload_helper.user.js index 4eb45e4..d10fcc5 100644 --- a/extra_bypasses/profitsfly_reload_helper.user.js +++ b/extra_bypasses/profitsfly_reload_helper.user.js @@ -10,10 +10,39 @@ const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/; if (domainRegex.test(window.location.href)) { - window.addEventListener('load', function() { - let reloading = false; + // Back up the current ref url + if (window.location.href.includes("/ref.php")) { + GM_setValue("profitsflyLocation", window.location.href); + } - // Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists + window.addEventListener('load', function() { + // Check if the current URL is just the domain + const url = new URL(window.location.href); + const path = url.pathname; + if (path === "/" || path === "") { + if (document.body.textContent.includes("You have 2 active sessions.")) { + // Click the continue button if a backed up url was loaded in the last 5 seconds + if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) { + for (const button of document.querySelectorAll("button")) { + if (button.textContent.trim() === "Continue") { + button.click(); + break; + } + } + } + } else { + // Load the backed up url + const lastLocation = GM_getValue("profitsflyLocation"); + if (lastLocation) { + GM_setValue("profitsflyGoBackTime", Date.now()); + GM_setValue("profitsflyOverrideLocation", lastLocation); + window.location.href = lastLocation; + } + } + } + + // Function to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists + let reloading = false; function checkForMessage() { const paragraphs = document.getElementsByTagName("p"); for (let p of paragraphs) { @@ -50,3 +79,4 @@ } })(); //------- +