Last active
May 4, 2024 22:53
-
-
Save jithurjacob/4d572b6e6be193650cdf8bb28536326a to your computer and use it in GitHub Desktop.
PluralSight Auto Play Next 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
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type (or see below for non wait option) | |
//localStorage.setItem("playbackRate", 2.1); | |
console.log('[start]Pluralsight Continuous Play'); | |
window.setInterval(function(){ | |
$('#next-module').click(); | |
},30000); |
Here is my own spin on the code. @mayanknc @JarkkoLaiho @John-Blair
This should work since it checks for the key words.
const keyWord = "Start module";
let autoNext = () => {
Array.from(document.querySelectorAll('button'))
.filter(b => b.textContent.includes(keyWord))
.forEach(b => b.click());
};
setInterval(autoNext, 2500);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mayanknc Now that Plularshight UI has been restylished, you script now longer works as the text seems to be changed in button (now format is like 'Start module X'). Could your update your script?