您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace video player with HTML5 native player (also enables download of videos)
当前为
// ==UserScript== // @name thisVID.com Native Player (HTML5) and download // @namespace _pc // @version 2 // @license MIT // @description Replace video player with HTML5 native player (also enables download of videos) // @author verydelight // @match *://thisvid.com/videos/* // @grant none // ==/UserScript== (function() { 'use strict'; function insertVideo() { const videoElement = document.querySelector('video.fp-engine'); if (!videoElement) return; const videoUrl = videoElement.src; const fpPlayer = document.querySelector('.fp-player'); const ktPlayer = document.getElementById('kt_player'); const imgElement = document.querySelector('.video-holder img'); [fpPlayer, ktPlayer, imgElement].forEach(el => el?.remove()); const newVideoElement = document.createElement('video'); newVideoElement.src = videoUrl; newVideoElement.controls = true; newVideoElement.setAttribute("style", "width:100%;"); const videoHolder = document.querySelector('.video-holder'); if (videoHolder) { videoHolder.appendChild(newVideoElement); newVideoElement.play(); } observer.disconnect(); } const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { if (mutation.addedNodes.length) { insertVideo(); } }); }); const targetNode = document.body; const config = { childList: true, subtree: true }; observer.observe(targetNode, config); })();