image viewer
by
tamanobi
2014-08-10 [2014/08/10 19:54:10]
画像集めに最適.ウェブページ中に直接リンクされている画像を画面上に表示します.画像をクリックすると,クリックすると戻ります.画面サイズに収まりきらない画像は,ウィンドウサイズにリサイズします.
@@ -5,4 +5,4 @@
* @license MIT License
* @require
*/
-(function(){var an=document.getElementsByTagName("a");var li=new Array();for(var i=0;i<an.length;i++){var ref=an[i].getAttribute("href");var re=new RegExp("(.*)\.(jpg|gif|png)");if((re.test(ref))){li.push(ref)}}var liex=li.filter(function(x,k,self){return(self.indexOf(x)===k)});var main=document.createElement("div");for(var j=0;j<liex.length;j++){var im=document.createElement("img");im.setAttribute("src",liex[j]);main.appendChild(im)}main.setAttribute("id","iv");main.style.position="absolute";main.style.left="0";main.style.top="0";main.style.width="100%";var bd=document.getElementsByTagName("body")[0];main.onclick=(function(b,m){return function(){b.removeChild(m)}})(bd,main);bd.appendChild(main)})();
+(function(){var an=document.getElementsByTagName("a");var li=new Array();for(var i=0;i<an.length;i++){var ref=an[i].getAttribute("href");var re=new RegExp("(.*)\.(jpg|gif|png)");if((re.test(ref))){li.push(ref)}}var liex=li.filter(function(x,k,self){return(self.indexOf(x)===k)});var main=document.createElement("div");for(var j=0;j<liex.length;j++){var im=document.createElement("img");im.setAttribute("src",liex[j]);main.appendChild(im)}main.setAttribute("id","iv");main.style.position="absolute";main.style.left="0";main.style.top="0";main.style.width="100%";var bd=document.getElementsByTagName("body")[0];main.onclick=(function(b,m){return function(){b.removeChild(m)}})(bd,main);bd.appendChild(main)})();
/*
* @title image viewer
* @description ウェブページ中に直接リンクされている画像を画面上に表示します.画像をクリックすると,クリックすると戻ります.画像集めに最適.
* @include http://*
* @license MIT License
* @require
*/
(function(){var an=document.getElementsByTagName("a");var li=new Array();for(var i=0;i<an.length;i++){var ref=an[i].getAttribute("href");var re=new RegExp("(.*)\.(jpg|gif|png)");if((re.test(ref))){li.push(ref)}}var liex=li.filter(function(x,k,self){return(self.indexOf(x)===k)});var main=document.createElement("div");for(var j=0;j<liex.length;j++){var im=document.createElement("img");im.setAttribute("src",liex[j]);main.appendChild(im)}main.setAttribute("id","iv");main.style.position="absolute";main.style.left="0";main.style.top="0";main.style.width="100%";var bd=document.getElementsByTagName("body")[0];main.onclick=(function(b,m){return function(){b.removeChild(m)}})(bd,main);bd.appendChild(main)})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。