mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-28 16:03:01 +05:00
improve profitsfly reload
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/191
This commit is contained in:
parent
0356f69da8
commit
d318178ec8
3 changed files with 10 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 93.1.9
|
// @version 93.1.10
|
||||||
// @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.1.9
|
// @version 93.1.10
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
@ -2991,12 +2991,15 @@
|
||||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating\.com|historyofyesterday\.com)\/.*/;
|
const domainRegex = /^https:\/\/.*\.(tradeshowrating\.com|historyofyesterday\.com)\/.*/;
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
|
let reloading = false;
|
||||||
|
|
||||||
// Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
// Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
||||||
function checkForMessage() {
|
function checkForMessage() {
|
||||||
const paragraphs = document.getElementsByTagName("p");
|
const paragraphs = document.getElementsByTagName("p");
|
||||||
for (let p of paragraphs) {
|
for (let p of paragraphs) {
|
||||||
if (/.*click.+ad.*to.+continue.*/is.test(p.textContent) && isElementVisibleAndEnabled(p)) {
|
if (/.*click.+ad.*to.+continue.*/is.test(p.textContent) && isElementVisibleAndEnabled(p)) {
|
||||||
location.reload(); // Reload the page
|
if (!reloading) location.reload(); // Reload the page
|
||||||
|
reloading = true;
|
||||||
return; // Exit the function after reloading
|
return; // Exit the function after reloading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,15 @@
|
||||||
const domainRegex = /^https:\/\/.*\.(tradeshowrating\.com|historyofyesterday\.com)\/.*/;
|
const domainRegex = /^https:\/\/.*\.(tradeshowrating\.com|historyofyesterday\.com)\/.*/;
|
||||||
if (domainRegex.test(window.location.href)) {
|
if (domainRegex.test(window.location.href)) {
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
|
let reloading = false;
|
||||||
|
|
||||||
// Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
// Functions to check for messages like "Click any ad & keep it open for 15 seconds to continue" and reload the page if one exists
|
||||||
function checkForMessage() {
|
function checkForMessage() {
|
||||||
const paragraphs = document.getElementsByTagName("p");
|
const paragraphs = document.getElementsByTagName("p");
|
||||||
for (let p of paragraphs) {
|
for (let p of paragraphs) {
|
||||||
if (/.*click.+ad.*to.+continue.*/is.test(p.textContent) && isElementVisibleAndEnabled(p)) {
|
if (/.*click.+ad.*to.+continue.*/is.test(p.textContent) && isElementVisibleAndEnabled(p)) {
|
||||||
location.reload(); // Reload the page
|
if (!reloading) location.reload(); // Reload the page
|
||||||
|
reloading = true;
|
||||||
return; // Exit the function after reloading
|
return; // Exit the function after reloading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue