mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-28 16:03:01 +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
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 93.2.6
|
// @version 93.2.7
|
||||||
// @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.2.6
|
// @version 93.2.7
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
@ -2997,35 +2997,40 @@
|
||||||
|
|
||||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
// Back up the current ref url
|
|
||||||
if (window.location.href.includes("/ref.php")) {
|
if (window.location.href.includes("/ref.php")) {
|
||||||
|
// Back up the current ref url
|
||||||
GM_setValue("profitsflyLocation", window.location.href);
|
GM_setValue("profitsflyLocation", window.location.href);
|
||||||
|
} else if (document.readyState === "complete") {
|
||||||
|
onWindowLoad();
|
||||||
|
} else {
|
||||||
|
window.addEventListener('load', onWindowLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', function() {
|
function onWindowLoad() {
|
||||||
// Check if the current URL is just the domain
|
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
||||||
const url = new URL(window.location.href);
|
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
||||||
const path = url.pathname;
|
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
||||||
if (path === "/" || path === "") {
|
for (const button of document.querySelectorAll("button")) {
|
||||||
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
if (button.textContent.trim() === "Continue") {
|
||||||
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
button.click();
|
||||||
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
break;
|
||||||
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
|
// 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);
|
setInterval(checkForMessage, 1000);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
//-------
|
//-------
|
||||||
|
|
|
@ -10,35 +10,40 @@
|
||||||
|
|
||||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
const domainRegex = /^https:\/\/.*\.(tradeshowrating.com|historyofyesterday.com|playonpc.online|quins.us)\/.*/;
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
// Back up the current ref url
|
|
||||||
if (window.location.href.includes("/ref.php")) {
|
if (window.location.href.includes("/ref.php")) {
|
||||||
|
// Back up the current ref url
|
||||||
GM_setValue("profitsflyLocation", window.location.href);
|
GM_setValue("profitsflyLocation", window.location.href);
|
||||||
|
} else if (document.readyState === "complete") {
|
||||||
|
onWindowLoad();
|
||||||
|
} else {
|
||||||
|
window.addEventListener('load', onWindowLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', function() {
|
function onWindowLoad() {
|
||||||
// Check if the current URL is just the domain
|
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
||||||
const url = new URL(window.location.href);
|
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
||||||
const path = url.pathname;
|
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
||||||
if (path === "/" || path === "") {
|
for (const button of document.querySelectorAll("button")) {
|
||||||
if (document.body.textContent.includes("You have 2 active sessions.")) {
|
if (button.textContent.trim() === "Continue") {
|
||||||
// Click the continue button if a backed up url was loaded in the last 5 seconds
|
button.click();
|
||||||
if ((Date.now() - GM_getValue("profitsflyGoBackTime", 0)) < 5000) {
|
break;
|
||||||
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
|
// 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);
|
setInterval(checkForMessage, 1000);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
//-------
|
//-------
|
||||||
|
|
Loading…
Reference in a new issue