您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Expands the frame size of videos embedded on old Reddit to 720p
// ==UserScript== // @name Reddit Embedded Video Expnader // @namespace http://tampermonkey.net/ // @version 0.1 // @description Expands the frame size of videos embedded on old Reddit to 720p // @author Spencer Ayers-Hale // @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt // @match https://*.reddit.com/* // @match https://www.redditmedia.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com // @grant none // ==/UserScript== (function() { 'use strict'; var num = document.getElementsByTagName("iframe").length; //number of iframes on page var cnt = 0; //currnent iframe var w = 1280; //traget width var h = 720; //traget height while(cnt < num){ var frame = document.getElementsByTagName("iframe")[cnt]; //get current iframe //apply new width and height if (frame.className == "media-embed" || frame.src.substring(0,23) == "https://www.youtube.com"){ frame.width=w; frame.height=h; } cnt ++; } })();