您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces built-in Flash player with HTML5
// ==UserScript== // @name Anime News Network HTML5 Video // @namespace DoomTay // @description Replaces built-in Flash player with HTML5 // @include https://www.animenewsnetwork.com/video/* // @version 0.5.1 // @grant none // @run-at document-start // ==/UserScript== var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(findVideoScript); }); }); var config = { childList: true, subtree: true }; observer.observe(document, config); for(var i = 0; i < document.scripts.length; i++) { findVideoScript(document.scripts[i]); } function findVideoScript(start) { if(start.nodeName == "SCRIPT" && start.src.includes("assets/bd277df0dd3412fa7734d08320ecbe1cd9089168.js")) { observer.disconnect(); start.on("load",function() { var oldInit = window.Video.init_player; window.Video.init_player = function(vid) { if(vid.flashvars["GetVideo"]) { this.init_player = null; this.initialized = true; $("flash-required-message").hide(); jQuery.get(vid.flashvars["GetVideo"],function(data) { var newVideo = document.createElement("video"); newVideo.width = 480; newVideo.height = 360; newVideo.controls = true; newVideo.src = data.querySelector("flv bitrate").textContent; newVideo.autoplay = document.location.hash == "#play-1"; newVideo.poster = data.querySelector("Still").textContent; $("video-player-area").append(newVideo); }) } else if(vid.flash.movie && (vid.flash.movie.includes("youtube") || vid.flash.movie.includes("hulu"))) { //A proper replacement of Hulu's embed might not be possible, as their HTML5 embed URL is too different from the Flash one vid.flash.movie = vid.flash.movie.replace("http:","https:"); window.UFO.pluginType = "npapi"; window.UFO.hasFlashVersion = function(major, release) { if(major == 9 && release == 115) return true; else return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)); } oldInit.apply(this, arguments); } else oldInit.apply(this, arguments); } }); } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址