Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name bot
- // @namespace http://tampermonkey.net/
- // @description Engage Me bot
- // @match http://engageme.tv/*
- // @version 1.1
- // @grant none
- // ==/UserScript==
- var initTime = new Date().getTime();
- function skip() {
- jwplayer().next();
- }
- function loadVid(a) {
- jwplayer().load(a);
- }
- function fix() {
- if((new Date().getTime() - initTime) > (1000 * 60 * 2)) {
- loadVid(5);
- }
- }
- function videoState() {
- var state = jwplayer().getState();
- console.log(state);
- if (state == "idle" || state == "buffering") {
- fix();
- } else {
- initTime = new Date().getTime();
- }
- if (state == "playing") skip();
- }
- (function() {
- setInterval(videoState, 6000);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement