// ==UserScript== // @name 湖南大学远程与继续教育学院 // @version 1.0.0 // @author 665817 // @match http://202.197.98.4:8888/LMS/coursePlayer/player.do* // @match http://202.197.98.4:8888/coursePlayer/player.do* // @connect 52wfy.cn // @run-at document-end // @grant unsafeWindow // @grant GM_xmlhttpRequest // ==/UserScript== var _self = unsafeWindow, url = location.pathname, $ = _self.jQuery; if (url == '/LMS/coursePlayer/player.do') { window.addEventListener('message', function(event) { if (event.data != 'jump') return; setTimeout(function() { $('a.do').parent().next().children().click(); }, 3E3); }, false); } else if (url == '/coursePlayer/player.do') { _self.jwplayer('video').onReady(function() { this.play(); $('video').on('ended', function() { top.postMessage('jump', '*'); }); }); }