mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2025-01-19 01:13:47 +05:00
fix for profitsfly thanks to Anon991299
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/191
This commit is contained in:
parent
2617038c89
commit
40aa09da8d
3 changed files with 4 additions and 60 deletions
|
@ -4,7 +4,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 93.4.13
|
// @version 93.4.14
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 93.4.13
|
// @version 93.4.14
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
@ -3002,41 +3002,13 @@
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
|
|
||||||
// ---RELOAD DEAD-END PAGES---
|
// ---RELOAD DEAD-END PAGES---
|
||||||
if (window.location.href.includes("/ref.php")) {
|
if (document.readyState === "complete") {
|
||||||
// Back up the current ref url
|
|
||||||
GM_setValue("profitsflyLocation", window.location.href);
|
|
||||||
} else if (document.readyState === "complete") {
|
|
||||||
onWindowLoad();
|
onWindowLoad();
|
||||||
} else {
|
} else {
|
||||||
window.addEventListener('load', onWindowLoad);
|
window.addEventListener('load', onWindowLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onWindowLoad() {
|
function onWindowLoad() {
|
||||||
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
|
||||||
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
|
||||||
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
|
||||||
for (const button of document.querySelectorAll("button")) {
|
|
||||||
if (button.textContent.trim() === "Continue") {
|
|
||||||
button.click();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the backed up url
|
|
||||||
if (GM_getValue("profitsflyLocation")
|
|
||||||
&& !/Less than.+passed between actions.+try again/.test(document.body.textContent)
|
|
||||||
&& !document.body.textContent.includes("Please wait...")) {
|
|
||||||
const lastLocation = GM_getValue("profitsflyLocation");
|
|
||||||
if (lastLocation) {
|
|
||||||
GM_setValue("profitsflyGoBackTime", Date.now());
|
|
||||||
GM_setValue("profitsflyOverrideLocation", lastLocation);
|
|
||||||
window.location.href = lastLocation;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
// 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;
|
let reloading = false;
|
||||||
|
|
|
@ -12,41 +12,13 @@
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
|
|
||||||
// ---RELOAD DEAD-END PAGES---
|
// ---RELOAD DEAD-END PAGES---
|
||||||
if (window.location.href.includes("/ref.php")) {
|
if (document.readyState === "complete") {
|
||||||
// Back up the current ref url
|
|
||||||
GM_setValue("profitsflyLocation", window.location.href);
|
|
||||||
} else if (document.readyState === "complete") {
|
|
||||||
onWindowLoad();
|
onWindowLoad();
|
||||||
} else {
|
} else {
|
||||||
window.addEventListener('load', onWindowLoad);
|
window.addEventListener('load', onWindowLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onWindowLoad() {
|
function onWindowLoad() {
|
||||||
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
|
||||||
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
|
||||||
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
|
||||||
for (const button of document.querySelectorAll("button")) {
|
|
||||||
if (button.textContent.trim() === "Continue") {
|
|
||||||
button.click();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the backed up url
|
|
||||||
if (GM_getValue("profitsflyLocation")
|
|
||||||
&& !/Less than.+passed between actions.+try again/.test(document.body.textContent)
|
|
||||||
&& !document.body.textContent.includes("Please wait...")) {
|
|
||||||
const lastLocation = GM_getValue("profitsflyLocation");
|
|
||||||
if (lastLocation) {
|
|
||||||
GM_setValue("profitsflyGoBackTime", Date.now());
|
|
||||||
GM_setValue("profitsflyOverrideLocation", lastLocation);
|
|
||||||
window.location.href = lastLocation;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
// 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;
|
let reloading = false;
|
||||||
|
|
Loading…
Reference in a new issue