您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
for the pas one. my own use, probably not for you.
// ==UserScript== // @name ipwebcam resize fix // @namespace http://lolno.com // @version 0.1 // @description for the pas one. my own use, probably not for you. // @author Dobby233Liu // @match *://*/browserfs.html // @grant none // ==/UserScript== const $exists = function(s){ return !(document.querySelectorAll(s).length <= 0); }; const $obj = function(s){ if(!$exists(s)) throw DOMException("Nonexist element/selector."); return (document.querySelectorAll(s).length == 1 ? document.querySelector(s) : document.querySelectorAll(s)); }; (function() { 'use strict'; window.onresize = function(e){ document.body.style.overflow = "hidden"; if(!$exists("#img1") && !$exists("#img2")) throw Error("!$exists('#img1') && !$exists('#img2'). That shouldn't happening.") if($exists("#img1")){ $obj("#img1").width = window.innerWidth; $obj("#img1").height = window.innerHeight; $obj("#img1").onclick = null; } if($exists("#img2")){ $obj("#img2").width = window.innerWidth; $obj("#img2").height = window.innerHeight; $obj("#img2").onclick = null; } }; window.onresize(); })();