Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures automatically
可以在图片新开页面引入这个库,类似这样。
// ==UserScript==
// @name New Userscript
// @namespace xxx
// @version 0.1
// @description try to take over the world!
// @author You
// @include *.jpg
// @include *.png
// @include *.gif
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.head.appendChild(scriptXXX);
document.head.appendChild(cssXXX);
divXXX.appendChild(body>img);
})();
发现一个不错的脚本https://github.com/fengyuanchen/viewerjs
是这样的,我有个想法:
如果不安装任何扩展和脚本的话,针对网页单独打开的图片,默认滑动滑轮,是不支持变大放小的,按住拖动也浏览不了大图片。
通过上面的脚本,可以支持单个图片放大缩小,翻转,移动,很是方便。
我知道有个扩展Better Image Viewer能支持这样的功能,但我发现还是不如viewerjs好用。
不知道作者有没有意愿单独开发一个针对单个图片的脚本?