no title [bookmarklet]

  • (function(o){function h(a,c,b){c.addEventListener?c.addEventListener(a,b,false):c.attachEvent("on"+a,b)}var g=document,j=g.documentElement,k=g.body;function f(a,c){a||(a="div");if(c){var b=f();b.innerHTML="<"+a+' id="'+c+'"></'+a+">";return b.firstChild}else return g.createElement(a)}var l={j:function(a,c){var b=new Date;b.setFullYear(Number(b.getFullYear())+1+"");g.cookie=a+"="+escape(c)+";path="+location.pathname+";expires="+b.toGMTString()+";"},h:function(a){var c=g.cookie.split("; ");for(var b in c)if("string"== typeof c[b]){var d=c[b].split("="),e=d[0];d=unescape(d[1]);if(e==a)return d}return null}};function p(a,c){var b=f();b.innerHTML='<input type="button"></input>';var d=b.firstChild;if(a)d.value=a;if(c)d.onclick=c;b.removeChild(d);return d}var m={f:null,g:null,a:null,i:function(){var a=this,c=a.f=f(),b=c.style;b.position="absolute";b.width="200px";b.top=this.e()+"px";b.left=this.d()+"px";b=this.g=f();b.style.backgroundColor="LightCyan";var d=p("\u8ffd\u52a0",function(){a.add()}),e=this.a=f();b.appendChild(d); c.appendChild(b);c.appendChild(e);g.body.appendChild(c);this.load()},add:function(){this.c(prompt("\u30bf\u30a4\u30c8\u30eb",""),this.d(),this.e());this.save()},e:function(){return j.scrollTop||k.scrollTop},d:function(){return j.scrollLeft||k.scrollLeft},c:function(a,c,b){var d=f();d.b=c+"_"+b+"_"+a;var e=f("span");e.innerHTML=a;e.title=d.b;e.style.k="gray";h("click",e,function(){window.scrollTo(c,b)});a=f("span");a.innerHTML="\u25a0";var q=this;h("dblclick",a,function(){d.parentNode.removeChild(d); q.save()});d.style.backgroundColor="AliceBlue";d.appendChild(a);d.appendChild(e);this.a.appendChild(d)},save:function(){var a=this.a.childNodes(),c="";for(i in a){var b=a[i];if(b.b)c+=b.b+"\n"}l.j("tax4_blog115_fc2_com_siori_cookie",c)},load:function(){var a=l.h("tax4_blog115_fc2_com_siori_cookie");a||(a="");var c=RegExp,b=0;a=a.split("\n");for(var d=a.length;b<d;b++)a[b].match(/(\d+)_(\d+)_(.*)/)&&this.c(c.$3,c.$1,c.$2)}};m.i();var n=m.f;setTimeout(function(){n.parentNode.removeChild(n)},parseInt(o* 1E3))})(3)
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/07/21 11:24:53 - 2010-07-21
  2. 2010/07/19 15:23:54 - 2010-07-19
  3. 2010/07/19 13:30:40 - 2010-07-19
  4. 2010/07/19 13:26:52 - 2010-07-19