|
11 | 11 | // @grant none |
12 | 12 | // @run-at document-end |
13 | 13 | // @homepageURL https://github.com/Nick2bad4u/UserStyles |
| 14 | +// @homepage https://github.com/Nick2bad4u/UserStyles |
14 | 15 | // @supportURL https://github.com/Nick2bad4u/UserStyles/issues |
15 | 16 | // @license Unlicense |
16 | | -// @note This is for use with: https://update.greasyfork.org/scripts/520655/Convert%20Ascent%20and%20Descent%20to%20Feet.user.js |
17 | 17 | // @downloadURL https://update.greasyfork.org/scripts/530304/Strava%20Button%20Clicker%20%5BFor%20Use%20Convert%20Ascent%20and%20Descent%20to%20Feet%5D%5BELevate%20%20Sauce%20Users%5D.user.js |
18 | 18 | // @updateURL https://update.greasyfork.org/scripts/530304/Strava%20Button%20Clicker%20%5BFor%20Use%20Convert%20Ascent%20and%20Descent%20to%20Feet%5D%5BELevate%20%20Sauce%20Users%5D.meta.js |
19 | 19 | // ==/UserScript== |
20 | 20 |
|
| 21 | +// Note: This is for use with: https://update.greasyfork.org/scripts/520655/Convert%20Ascent%20and%20Descent%20to%20Feet.user.js |
| 22 | + |
21 | 23 | (function () { |
22 | | - 'use strict'; |
| 24 | + 'use strict'; |
23 | 25 |
|
24 | | - // Run 5 seconds after the page finishes loading |
25 | | - setTimeout(() => { |
26 | | - // Select the button by its ID |
27 | | - let button = document.querySelector('#extendedStatsButton'); |
28 | | - if (button) { |
29 | | - button.click(); |
30 | | - console.log('Button clicked.'); |
| 26 | + // Run 5 seconds after the page finishes loading |
| 27 | + setTimeout(() => { |
| 28 | + // Select the button by its ID |
| 29 | + let button = document.querySelector('#extendedStatsButton'); |
| 30 | + if (button) { |
| 31 | + button.click(); |
| 32 | + console.log('Button clicked.'); |
31 | 33 |
|
32 | | - // Close the popup after 3 seconds using the Escape key |
33 | | - setTimeout(() => { |
34 | | - let event = new KeyboardEvent('keydown', { |
35 | | - key: 'Escape', |
36 | | - code: 'Escape', |
37 | | - keyCode: 27, |
38 | | - which: 27, |
39 | | - bubbles: true, |
40 | | - }); |
41 | | - document.dispatchEvent(event); |
42 | | - console.log('Popup closed.'); |
43 | | - }, 3000); |
44 | | - } else { |
45 | | - console.error('Button not found. Please ensure the selector is correct.'); |
46 | | - } |
47 | | - }, 5000); |
| 34 | + // Close the popup after 3 seconds using the Escape key |
| 35 | + setTimeout(() => { |
| 36 | + let event = new KeyboardEvent('keydown', { |
| 37 | + key: 'Escape', |
| 38 | + code: 'Escape', |
| 39 | + keyCode: 27, |
| 40 | + which: 27, |
| 41 | + bubbles: true, |
| 42 | + }); |
| 43 | + document.dispatchEvent(event); |
| 44 | + console.log('Popup closed.'); |
| 45 | + }, 3000); |
| 46 | + } else { |
| 47 | + console.error('Button not found. Please ensure the selector is correct.'); |
| 48 | + } |
| 49 | + }, 5000); |
48 | 50 | })(); |
0 commit comments