Last active
April 18, 2019 08:36
-
-
Save quantumsheep/a567b5165de5fe77c2f8d707fc487a2b to your computer and use it in GitHub Desktop.
TamperMonkey Vodeclic Bot
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
// ==UserScript== | |
// @name Vodeclic bot | |
// @version 0.5 | |
// @description Bot for vodeclic | |
// @author QuantumSheep | |
// @include *://*.vodeclic.com/*/formation/* | |
// @include *://*.vodeclic.com/*/course/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function update_event() { | |
const timer = setInterval(function () { | |
const video = document.querySelector('video'); | |
if (video) { | |
video.addEventListener('timeupdate', function () { | |
if ((this.currentTime / this.duration) === 1) { | |
document.querySelector('div[data-msv-next]').click(); | |
setTimeout(() => update_event(), 1000); | |
} | |
}); | |
clearInterval(timer); | |
} | |
}, 5000); | |
} | |
update_event(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment