mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-29 00:13: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() {
|
||||
'use strict';
|
||||
if (window.location.hostname === 'shareus.io') {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// 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
|
||||
document.addEventListener('DOMContentLoaded', function() { // Wait for the page to be loaded
|
||||
|
||||
function clickButton() {
|
||||
// Find the button element
|
||||
const button = document.querySelector(buttonSelector);
|
||||
const button = document.querySelector("#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button");
|
||||
if (button) {
|
||||
button.click();
|
||||
console.log("Button clicked!");
|
||||
//clearInterval(intervalId); // Stop attempting once clicked
|
||||
} else {
|
||||
console.log("Button not found!");
|
||||
}
|
||||
}
|
||||
|
||||
// Set interval to attempt clicking every 1 second
|
||||
const intervalId = setInterval(clickButton, 1000);
|
||||
const intervalId = setInterval(clickButton, 1000); // Set interval to attempt clicking every 1 second
|
||||
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -8,25 +8,17 @@
|
|||
(function() {
|
||||
'use strict';
|
||||
if (window.location.hostname === 'shareus.io') {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// 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
|
||||
document.addEventListener('DOMContentLoaded', function() { // Wait for the page to be loaded
|
||||
|
||||
function clickButton() {
|
||||
// Find the button element
|
||||
const button = document.querySelector(buttonSelector);
|
||||
const button = document.querySelector("#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button");
|
||||
if (button) {
|
||||
button.click();
|
||||
console.log("Button clicked!");
|
||||
//clearInterval(intervalId); // Stop attempting once clicked
|
||||
} else {
|
||||
console.log("Button not found!");
|
||||
}
|
||||
}
|
||||
|
||||
// Set interval to attempt clicking every 1 second
|
||||
const intervalId = setInterval(clickButton, 1000);
|
||||
const intervalId = setInterval(clickButton, 1000); // Set interval to attempt clicking every 1 second
|
||||
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue