非公開 hatebookmarklet

  • /*
     * @title hatebookmarklet
     * @description my hatebookmarklet
     * @include http://b.hatena.ne.jp/entry/*
     * @license MIT License
     * @private
     */
    (function(){
    var comments = document.getElementById("all-bookmarks"),i,isDisplay,bcome,comtext;
      if(comments){
        isDisplay = comments.style.display; 
          if(isDisplay == "block"){
            bcome = comments.getElementsByTagName("span");
            for(i=0;i<bcome.length;i++){
              if(bcome[i].getAttribute("class") ==="comment" ){
                comtext = bcome[i].textContent;
                  if(comtext===''){ 
                    bcome[i].parentNode.parentNode.style.display="none";
                  }
              }
            } 
          } else {
            alert ("全てのブックマークタブが表示されていません。");
          }
        }
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/10/11 20:33:58 - 2013-10-11