mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-29 16:33:02 +05:00
simplify the shareus.io script
This commit is contained in:
parent
42fd4b36c8
commit
f6e8b03dc6
2 changed files with 10 additions and 26 deletions
|
@ -1675,25 +1675,17 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (window.location.hostname === 'shareus.io') {
|
if (window.location.hostname === 'shareus.io') {
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() { // Wait for the page to be loaded
|
||||||
// Define the button selector
|
|
||||||
const buttonSelector = "#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button";
|
|
||||||
|
|
||||||
// Function to click the button
|
|
||||||
function clickButton() {
|
function clickButton() {
|
||||||
// Find the button element
|
const button = document.querySelector("#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button");
|
||||||
const button = document.querySelector(buttonSelector);
|
|
||||||
if (button) {
|
if (button) {
|
||||||
button.click();
|
button.click();
|
||||||
console.log("Button clicked!");
|
|
||||||
//clearInterval(intervalId); // Stop attempting once clicked
|
//clearInterval(intervalId); // Stop attempting once clicked
|
||||||
} else {
|
|
||||||
console.log("Button not found!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const intervalId = setInterval(clickButton, 1000); // Set interval to attempt clicking every 1 second
|
||||||
// Set interval to attempt clicking every 1 second
|
|
||||||
const intervalId = setInterval(clickButton, 1000);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -8,25 +8,17 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (window.location.hostname === 'shareus.io') {
|
if (window.location.hostname === 'shareus.io') {
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() { // Wait for the page to be loaded
|
||||||
// Define the button selector
|
|
||||||
const buttonSelector = "#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button";
|
|
||||||
|
|
||||||
// Function to click the button
|
|
||||||
function clickButton() {
|
function clickButton() {
|
||||||
// Find the button element
|
const button = document.querySelector("#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button");
|
||||||
const button = document.querySelector(buttonSelector);
|
|
||||||
if (button) {
|
if (button) {
|
||||||
button.click();
|
button.click();
|
||||||
console.log("Button clicked!");
|
|
||||||
//clearInterval(intervalId); // Stop attempting once clicked
|
//clearInterval(intervalId); // Stop attempting once clicked
|
||||||
} else {
|
|
||||||
console.log("Button not found!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const intervalId = setInterval(clickButton, 1000); // Set interval to attempt clicking every 1 second
|
||||||
// Set interval to attempt clicking every 1 second
|
|
||||||
const intervalId = setInterval(clickButton, 1000);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue