您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
When looking at a large image file that extends beyond the borders of the screen, this will fit it onto your screen
- // ==UserScript==
- // @name Image Window Fitter
- // @namespace http://use.i.E.your.homepage/
- // @version 0.1
- // @description When looking at a large image file that extends beyond the borders of the screen, this will fit it onto your screen
- // @match http*://*/*.jpg
- // @match http*://*/*.jpeg
- // @match http*://*/*.png
- // @match http*://*/*.gif
- // @match http*://*/*.tif
- // @match http*://*/*.tiff
- // @match http*://*/*.bmp
- // @author wpatter6
- // @copyright 2014+, wpatter6
- // ==/UserScript==
- function addJQuery(callback) {
- var script = document.createElement("script");
- script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
- script.addEventListener('load', function() {
- var script = document.createElement("script");
- script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
- document.body.appendChild(script);
- }, false);
- document.body.appendChild(script);
- }
- function main() {
- jQ('img').each(function (){
- if(jQ(this).width() > Math.min(jQ(this).parent().width(), jQ(window).width())){
- console.log("Resizing image " + (jQ(this).attr("id") || ""));
- jQ(this).css({"width":"100%"});
- }
- });
- }
- addJQuery(main);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址