Skip to content

Instantly share code, notes, and snippets.

@quantumsheep
Last active April 18, 2019 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantumsheep/a567b5165de5fe77c2f8d707fc487a2b to your computer and use it in GitHub Desktop.
Save quantumsheep/a567b5165de5fe77c2f8d707fc487a2b to your computer and use it in GitHub Desktop.
TamperMonkey Vodeclic Bot
// ==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