|
6 | 6 | // @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically |
7 | 7 | // @description:zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图) |
8 | 8 | // @description:zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖) |
9 | | -// @version 2018.4.16.1 |
| 9 | +// @version 2018.4.16.2 |
10 | 10 | // @created 2011-6-15 |
11 | 11 | // @namespace http://userscripts.org/users/NLF |
12 | 12 | // @homepage http://hoothin.com |
|
4581 | 4581 | <head>\ |
4582 | 4582 | <title>' + title + ' '+i18n("exportImages")+'</title>\ |
4583 | 4583 | <style>\ |
| 4584 | + .toTop{width:28px;height:28px;border-radius:14px;position: fixed;right:2px;bottom: 2px;cursor: pointer;background-color:#000;opacity:.3;padding:0em!important;border:0px!important;}\ |
| 4585 | + .toTop:hover{opacity:1}\ |
| 4586 | + .toTop>span{height:28px;line-height:28px;display:block;color:#FFF;text-align:center;font-size:20px;}\ |
4584 | 4587 | .grid{-moz-column-count:4;-webkit-column-count:4;column-count:4;-moz-column-gap: 1em;-webkit-column-gap: 1em;column-gap: 1em;}\ |
4585 | 4588 | .grid>div{padding: 1em;margin: 0 0 1em 0;-moz-page-break-inside: avoid;-webkit-column-break-inside: avoid;break-inside: avoid;border: 1px solid #000;}\ |
4586 | 4589 | .grid>div>img{width: 100%;margin-bottom:10px;}\ |
|
4592 | 4595 | .select{opacity: 0.33;}\ |
4593 | 4596 | </style>\ |
4594 | 4597 | </head>\ |
| 4598 | + <div class="toTop">\ |
| 4599 | + <span>↑</span>\ |
| 4600 | + </div>\ |
4595 | 4601 | <body class="'+prefs.gallery.exportType+'">\ |
4596 | | - <img id="bigImg" style="pointer-events:none;position:fixed;z-index:999;max-height:100vh;">\ |
| 4602 | + <img id="bigImg" style="pointer-events:none;position:fixed;z-index:999;max-height:100vh;top:0px;">\ |
4597 | 4603 | <p>【'+i18n("picTitle")+'】:' + title + '</p>\ |
4598 | 4604 | <p>【'+i18n("picNum")+'】:' + nodes.length + ' <select onchange="document.body.className=this.options[this.options.selectedIndex].value"><option value="grid" '+(prefs.gallery.exportType=="grid"?"selected='selected'":"")+'>'+i18n("grid")+'</option><option value="gridBig" '+(prefs.gallery.exportType=="gridBig"?"selected='selected'":"")+'>'+i18n("gridBig")+'</option><option value="list" '+(prefs.gallery.exportType=="list"?"selected='selected'":"")+'>'+i18n("list")+'</option> </select> \ |
4599 | 4605 | <input type="button" value="'+i18n("exportImagesUrl")+'" onclick="var imgStr=\'\',selList=document.querySelectorAll(\'.select>img\');if(selList.length==0)[].forEach.call(document.querySelectorAll(\'img\'),function(i){imgStr+=i.src+\' \\n\'});else{[].forEach.call(selList,function(i){imgStr+=i.src+\' \\n\'});}window.prompt(\''+i18n("exportImagesUrlPop")+'\',imgStr);">\ |
4600 | 4606 | </p>'; |
4601 | 4607 |
|
4602 | 4608 | html += arr.join('\n') + |
4603 | 4609 | '<script type="text/javascript">\ |
| 4610 | + document.querySelector(".toTop").addEventListener("click", function(){\ |
| 4611 | + document.body.scrollIntoView();\ |
| 4612 | + });\ |
4604 | 4613 | [].forEach.call(document.querySelectorAll("div>img"),function(i){\ |
4605 | 4614 | i.onmouseover=i.onmousemove=function(e){if(e.ctrlKey)document.querySelector("#bigImg").src=this.src;};\ |
4606 | 4615 | i.onmouseout=function(e){document.querySelector("#bigImg").src="";}\ |
|
0 commit comments