Skip to content

Instantly share code, notes, and snippets.

@burak-kara
Last active October 10, 2022 11:46
Show Gist options
  • Save burak-kara/60812ccba20d23a09f726b9ce7a0cb99 to your computer and use it in GitHub Desktop.
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.
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