Greasy Fork is available in English.

shareus.io auto-skip

Automatically click the buttons to skip to the target link

  1. // ==UserScript==
  2. // @name shareus.io auto-skip
  3. // @version 1.0
  4. // @author Rust1667
  5. // @description Automatically click the buttons to skip to the target link
  6. // @match https://shareus.io/*
  7. // @grant none
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=shareus.io
  9. // @namespace https://greasyfork.org/users/980489
  10. // ==/UserScript==
  11.  
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Define the button selector
  17. const buttonSelector = "#root > div > main > div.main-container-1 > div.main-container-2 > div:nth-child(1) > div.adunit-container > button";
  18.  
  19. // Function to click the button
  20. function clickButton() {
  21. // Find the button element
  22. const button = document.querySelector(buttonSelector);
  23. if (button) {
  24. button.click();
  25. console.log("Button clicked!");
  26. //clearInterval(intervalId); // Stop attempting once clicked
  27. } else {
  28. console.log("Button not found!");
  29. }
  30. }
  31.  
  32. // Set interval to attempt clicking every 1 second
  33. const intervalId = setInterval(clickButton, 1000);
  34. })();