微吼视频教程交互体验
当前为
// ==UserScript==
// @name weihou
// @namespace http://tampermonkey.net/
// @version 0.3
// @description 微吼视频教程交互体验
// @author galan99
// @match https://live.vhall.com/room/watch/*
// @license MIT
// @grant none
// ==/UserScript==
(function() {
'use strict';
function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
function run() {
var video = document.querySelector("video");
var madol = document.querySelector("#vhy-danmaku-wrapbox");
console.log(video)
if (video && madol) {
madol.style.display = "none";
video.addEventListener("click", function() {
if (video.paused) {
video.play();
} else {
video.pause();
}
});
} else {
sleep(500).then(function() {
run();
});
}
}
run()
})();