NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Shiki auto_increment-user_rate
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Авто-переключение серий по окончании видео
// @author SThorn
// @match https://play.shikimori.org/animes/*
// @include http://*/*
// @include https://*/*
// @grant none
// @run-at document-end
// @license MIT
// @copyright 2019, Newt300 (https://openuserjs.org//users/Newt300)
// ==/UserScript==
(function() {
'use strict';
if (window === window.top) {
window.addEventListener("message", function(e) {
if (e.data === 'auto_increment-user_rate') {
document.querySelector('.c-control.increment-user_rate').click()
}
});
} else {
setTimeout(function () {
if (document.querySelector('video')) {
console.log('auto_increment-user_rate is working');
document.querySelector('video').addEventListener('ended', function(e) {
window.top.postMessage('auto_increment-user_rate', 'https://play.shikimori.org/*');
});
//document.querySelector('video').play();
} else {
console.log('auto_increment-user_rate is not working. Where is video??');
}
}, 10000);
}
})();