Last active
October 10, 2022 11:46
-
-
Save burak-kara/60812ccba20d23a09f726b9ce7a0cb99 to your computer and use it in GitHub Desktop.
Skip your mandatory -and ofc boring- pdf-based time-sensitive slides in the background.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isInProgress = true; | |
const PAGE_DURATION = 90000; // as milliseconds | |
const BUTTON_TITLE = "Next Page"; | |
const getElement = selector => document.querySelector(selector); | |
setInterval(() => { | |
if (isInProgress && getElement(`[title="${BUTTON_TITLE}"]`)) { | |
isInProgress = false; | |
setTimeout(() => { | |
getElement(`[title="${BUTTON_TITLE}"]`).click(); | |
isInProgress = true; | |
}, PAGE_DURATION); | |
} | |
}, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment