您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Forces all embedded Youtube videos to Invidio.us for watch youtube videos with more privacy
// ==UserScript== // @name Youtube to Invidio.us Embed // @description Forces all embedded Youtube videos to Invidio.us for watch youtube videos with more privacy // @version 1.2 // @include http* // @exclude *youtube.com/* // @grant none // @namespace https://greasyfork.org/users/433508 // ==/UserScript== // Domain of Invidio instance, change by your prefer (Default: invidio.us) var invidioUrl = 'invidio.us'; function noYt() { var i, attr, index, video, tag = document.getElementsByTagName('iframe'); for (i = 0; i < tag.length; i++) { attr = tag[i].getAttribute('src'); index = 0; if (attr.indexOf('youtube.com') !== -1) { if (attr.indexOf('/v/') >= 0) { index = attr.indexOf('/v/') + 3; } else if(attr.indexOf('?v=') >= 0) { index = attr.indexOf('?v=') + 3; } else if (attr.indexOf('/embed/') >= 0) { index = attr.indexOf('/embed/') + 7; } video = attr.substring(index, index + 11); } if (index > 0) { tag[i].setAttribute('src', 'https://' + invidioUrl + '/embed/' + video); tag[i].setAttribute('style', 'min-height:100%; min-width:100%;'); tag[i].setAttribute('frameborder', '0'); tag[i].setAttribute('allowfullscreen', '1'); } } } noYt();