您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove autoplay from videos
// ==UserScript== // @name Video Autoplay removal (aftonbladet.se, expressen.se) // @namespace https://github.com/prositen // @version 0.4.1 // @description Remove autoplay from videos // @author prositen // @match *://*.aftonbladet.se/* // @match *://*.expressen.se/* // @update https://github.com/prositen/tampermonkey-scripts/raw/master/autoplay-removal.user.js // @grant none // @require https://code.jquery.com/jquery-3.1.1.min.js // @run-at document-end // ==/UserScript== (function() { 'use strict'; var jq = jQuery.noConflict(); jq('iframe[allowfullscreen],iframe[src*=autoplay]').each(function(i,v) { var src = v.src; var new_src = src.replace('autoplay=true', 'autoplay=false'); if (new_src == src) { new_src += "&autoplay=false"; } new_src = new_src.replace('sticky=true','sticky=false'); v.src = new_src; jq(v).removeAttr('data-sticky'); }); // Your code here... })();