您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Customize video playback
当前为
// ==UserScript== // @name Browser Video Options // @description Customize video playback // @author Karl Piper // @homepage https://gf.qytechs.cn/en/users/8252 // @namespace https://gf.qytechs.cn/en/users/8252 // @include /https?:\/\/.*\.(mp4|webm)/ // @include /file:\/\/.*\.(mp4|webm)/ // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js // @icon https://i.imgur.com/CxT2VtA.png // @version 1.0 // ==/UserScript== controls = true; loop = true; autoplay = true; muted = false; width = ''; height = ''; poster = ''; volume = ''; /*╔══════════╦══════════════════════════════════════╦════════════╗ ║ Options ║ Description ║ Value ║ ╠══════════╬══════════════════════════════════════╬════════════╣ ║ Controls ║ Show video control bar ║ true/false ║ ║ Loop ║ Replay video after ending ║ true/false ║ ║ Autoplay ║ Automatically start playing ║ true/false ║ ║ Muted ║ Mute video (override volume) ║ true/false ║ ║ Width ║ Video width, optional ║ CSS units ║ ║ Height ║ Video height, optional ║ CSS units ║ ║ Poster ║ Placeholder image, optional ║ URL ║ ║ Volume ║ Volume, defaults to 1.0, optional ║ 0.0 - 1.0 ║ ╚══════════╩══════════════════════════════════════╩════════════╝*/ $(function(){ //replace with blank video element $('video').replaceWith(function () { return $('<' + this.nodeName + '>').append($(this).contents()); }); //set volume $('video').prop('volume', volume); //nullify empty settings if (!width) { width = null; } if (!height) { height = null; } if (!muted) { muted = null; } if (!poster) { poster = null; } if (!volume) { $('video').prop('volume', 1); } // add self closing attributes to video element $('video').attr({ controls, autoplay, loop, width, height, poster, muted }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址