share-on-tumblr

    @@ -5,6 +5,7 @@ * @license ないよ * @require */ +(function(){ var d=document, w=window, @@ -38,4 +39,4 @@ }; if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a(); } -void(0) +})();
  • /*
     * @title share-on-tumblr
     * @description Tumblr のブックマークレットのウインドウを作らない版
     * @include http://*
     * @license ないよ
     * @require 
     */
    (function(){
    
    var d=document,
      w=window,
      e=w.getSelection,
      k=d.getSelection,
      x=d.selection,
      s=(e?e():(k)?k():(x?x.createRange().text:0)),
      f='http://www.tumblr.com/share',
      l=d.location,
      e=encodeURIComponent,
      p='?v=3&u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s),
      u=f+p,
      A=document.createElement('a'),
      D=document.createElement('div'),
      F=document.createElement('iframe'),
      R=function(){D.parentNode.removeChild(D);};
    try{
      if( !/^(.*\.)?tumblr[^.]*$/.test(l.host) ) throw(0);
      tstbklt();
    }catch(z){
      a=function(){
        document.body.appendChild(D);
        D.style.cssText='background:#666;opacity:0.8;position:fixed;bottom:10px;right:10px;z-index:65536;-moz-border-radius:5px;padding:2px;';
        F.style.cssText='width:500px;height:500px;';
        A.innerHTML = 'X';
        A.addEventListener('click',R,false);
        A.style.cssText='display:block;padding:2px;line-height:11px;font-size:8px;width:1em;height:1em;margin-left:auto;background:#C33;color:#FFF;text-decoration:none;cursor:pointer;';
        D.appendChild(A);
        D.appendChild(F);
        F.src=u;
      };
      if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();
    }
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/11/08 10:41:07 - 2010-11-08
  2. 2010/11/07 15:01:07 - 2010-11-07
  3. 2010/11/07 14:55:14 - 2010-11-07
  4. 2010/11/07 10:16:41 - 2010-11-07
  5. 2010/11/07 09:55:54 - 2010-11-07
  6. 2010/11/07 08:42:36 - 2010-11-07
  7. 2010/11/07 08:42:06 - 2010-11-07
  8. 2010/11/07 08:39:44 - 2010-11-07