image viewer

    @@ -1,6 +1,6 @@ /* * @title image viewer - * @description ウェブページ中に存在する画像ファイルを表示します. + * @description ウェブページ中にリンクされている画像ファイルを表示します. * @include http://* * @license MIT License * @require
  • /*
     * @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 el=an[i].getElementsByTagName("img");var ref=an[i].getAttribute("href");var re=new RegExp("(.*)\.(jpg|gif|png)");if((re.test(ref))&&el[0]!=null&&el[0]!=undefined){li.push(ref);}}var liex=li.filter(function(x,i,self){return (self.indexOf(x)===i);});console.log(liex);var main=document.createElement("div");for(var i=0;i<liex.length;i++){var im=document.createElement("img");im.setAttribute("src",liex[i]);main.appendChild(im);}main.style.position="absolute";main.style.left="0";main.style.right="0";main.style.width="100%";(document.getElementsByTagName("body")[0]).appendChild(main)})();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/08/10 19:54:10 - 2014-08-10
  2. 2014/08/10 18:56:45 - 2014-08-10
  3. 2014/08/10 18:55:04 - 2014-08-10
  4. 2014/08/10 18:53:56 - 2014-08-10
  5. 2014/08/10 18:35:29 - 2014-08-10
  6. 2014/08/10 17:27:03 - 2014-08-10
  7. 2014/08/10 17:26:10 - 2014-08-10