mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-27 23:43:02 +05:00
profitsfly improvement thanks to Anon991299
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/191
This commit is contained in:
parent
6caaceb42c
commit
67d6f6a3dd
3 changed files with 58 additions and 48 deletions
|
@ -4,7 +4,7 @@
|
|||
// @run-at document-start
|
||||
// @author Amm0ni4
|
||||
// @noframes
|
||||
// @version 93.2.6
|
||||
// @version 93.2.7
|
||||
// @grant GM_setValue
|
||||
// @grant GM_getValue
|
||||
// @grant GM_addStyle
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// @run-at document-start
|
||||
// @author Amm0ni4
|
||||
// @noframes
|
||||
// @version 93.2.6
|
||||
// @version 93.2.7
|
||||
// @grant GM_setValue
|
||||
// @grant GM_getValue
|
||||
// @grant GM_addStyle
|
||||
|
@ -2997,35 +2997,40 @@
|
|||
|
||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
||||
if (domainRegex.test(window.location.href)) {
|
||||
// Back up the current ref url
|
||||
if (window.location.href.includes("/ref.php")) {
|
||||
// Back up the current ref url
|
||||
GM_setValue("profitsflyLocation", window.location.href);
|
||||
} else if (document.readyState === "complete") {
|
||||
onWindowLoad();
|
||||
} else {
|
||||
window.addEventListener('load', onWindowLoad);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the backed up url
|
||||
if (GM_getValue("profitsflyLocation")
|
||||
&& !document.body.textContent.includes("Less than 18 seconds have passed between actions. Robot verification failed, please try again...")
|
||||
&& !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
|
||||
|
@ -3062,7 +3067,7 @@
|
|||
}
|
||||
|
||||
setInterval(checkForMessage, 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
//-------
|
||||
|
|
|
@ -10,35 +10,40 @@
|
|||
|
||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
||||
if (domainRegex.test(window.location.href)) {
|
||||
// Back up the current ref url
|
||||
if (window.location.href.includes("/ref.php")) {
|
||||
// Back up the current ref url
|
||||
GM_setValue("profitsflyLocation", window.location.href);
|
||||
} else if (document.readyState === "complete") {
|
||||
onWindowLoad();
|
||||
} else {
|
||||
window.addEventListener('load', onWindowLoad);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the backed up url
|
||||
if (GM_getValue("profitsflyLocation")
|
||||
&& !document.body.textContent.includes("Less than 18 seconds have passed between actions. Robot verification failed, please try again...")
|
||||
&& !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
|
||||
|
@ -75,7 +80,7 @@
|
|||
}
|
||||
|
||||
setInterval(checkForMessage, 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
//-------
|
||||
|
|
Loading…
Reference in a new issue