Greasy Fork is available in English.

Master File Random AM Button Clicker

Clicks a button at random intervals

このスクリプトは単体で利用できません。右のようなメタデータを含むスクリプトから、ライブラリとして読み込まれます: // @require https://update.greatest.deepsurf.us/scripts/494463/1373518/Master%20File%20Random%20AM%20Button%20Clicker.js

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
  1. // ==UserScript==
  2. // @name Master File Random AM Button Clicker
  3. // @namespace https://greatest.deepsurf.us/master-file-random-Am-button-clicker
  4. // @version 3.0
  5. // @description Clicks a button at random intervals
  6. // @license MIT
  7. // @match https://*.apple.com/*
  8. // @grant none
  9. // @downloadURL https://update.greatest.deepsurf.us/
  10. // @updateURL https://update.greatest.deepsurf.us/
  11. // ==/UserScript==
  12.  
  13. function getRandomInt(min, max) {
  14. min = Math.ceil(min);
  15. max = Math.floor(max);
  16. return Math.floor(Math.random() * (max - min) + min);
  17. }
  18.  
  19. function doSomething() {
  20. // Find the "Next" button using its class
  21. var nextButton = document.querySelector('amp-playback-controls-item-skip.next');
  22. if (nextButton) {
  23. nextButton.click();
  24. } else {
  25. console.log("Next button not found.");
  26. }
  27. }
  28.  
  29. (function loop() {
  30. var rand = getRandomInt(35000, 45000);
  31. console.log(rand);
  32. setTimeout(function() {
  33. doSomething();
  34. loop();
  35. }, rand);
  36. })();