-
-
Save tuantmb/f48b914a6db040ee1d73fc51782310c6 to your computer and use it in GitHub Desktop.
Pluralsight AutoNext Module
This file contains 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 autoNext = () => { | |
const modal = document.getElementsByClassName('player-modal is-active'); | |
if (modal.length > 0) { | |
// const buttons = document.querySelectorAll('[data-css-176v989]'); | |
const buttons = document.getElementsByClassName('u-full-width'); | |
console.log('checking...', buttons.length); | |
for (let i = 0; i < buttons.length; i++) { | |
const button = buttons[i]; | |
console.log(button.textContent); | |
if (button.textContent === 'Continue to next module') { | |
console.log('Next module!'); | |
button.click(); | |
} | |
} | |
} | |
}; | |
setInterval(autoNext, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment