Skip to content

Instantly share code, notes, and snippets.

@MrMohebi
Created January 29, 2022 13:47
Show Gist options
  • Save MrMohebi/4b1e4c0b7ba258f8008cceeda45541c8 to your computer and use it in GitHub Desktop.
Save MrMohebi/4b1e4c0b7ba258f8008cceeda45541c8 to your computer and use it in GitHub Desktop.
lms lessens power point continue playing
function checkTimer () {
//let x = document.getElementsByClassName('progressbar__label_type_time')[0].innerHTML.split(" / ")
//if (x[0] == x[1]) {
// var e = new KeyboardEvent('keydown', {'keyCode': 32, 'which': 32});
// document.dispatchEvent(e);
//}
if(document.getElementsByClassName('universal-control-panel__button_play-pause')[0].getAttribute("aria-label") == "play"){
var e = new KeyboardEvent('keydown', {'keyCode': 32, 'which': 32});
document.dispatchEvent(e);
}
}
setInterval(checkTimer, 2500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment