// ==UserScript==
// @name 记者之家
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
function isVideoPlaying() {
var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
if (!videos[i].paused ) {
console.log("是否有视频当前时间:", videos[i].currentTime);
var targetTime = videos[i].duration - 1;
videos[i].currentTime = targetTime;
return true;
}
}
return false;
}
setInterval(function() {
var isPlaying = isVideoPlaying();
console.log("是否有视频在播放:", isPlaying);
}, 3000);
})();
第二种方法(请在移动端微信端打开):
https://zhuanlan.zhihu.com/p/531488141


Mozilla/5.0 (Linux; Android 5.0; SM-N9100 Build/LRX21V) > AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 > Chrome/37.0.0.0 Mobile Safari/537.36 > MicroMessenger/6.0.2.56_r958800.520 NetType/WIFI