bookmarklet

    @@ -28,7 +28,7 @@ var idx = html.search("#[0-9]{7}"); if ( idx < 0 ) continue; var comm_idx = html.substring(idx + 1, idx + 1 + 7); - html = html.substring(0,idx) + '<span onmousemove="__comm(e, '+ comm_idx +');" style="color:blue;">#' + comm_idx + html = html.substring(0,idx) + '<span onmousemove="function(e){__comm(e, '+ comm_idx +')}" style="color:blue;">#' + comm_idx + '</span>' + html.substring(idx + 8); elm.innerHTML = html; }
  • /*
     * @title bookmarklet
     * @description my bookmarklet
     * @include http://*
     * @license MIT License
     * @require 
     */
    
    function __comm(e, idx)
    {
       var span = document.getElementById('comment_otherdetails_' + idx);
       if ( !span ) return;
       var html = span.parentNode.parentNode.parentNode.getElementsByClassName('contents_text')[0].innerHTML;
       var popup = document.getElementById('__commPopup')
       popup.innerHTML = html;
       popup.style.display='';
       popup.style.left='';
       popup.style.right='';
    }
    
    (function o()
    {
    	var elms=document.getElementsByClassName('contents_text');
            var length = elms.length;
            for(i = 0; i < length; ++i){
                elm = elms[i];
                html = elm.innerHTML;
                var idx = html.search("#[0-9]{7}");
                if ( idx < 0 ) continue;
                var comm_idx = html.substring(idx + 1, idx + 1 + 7);
                html = html.substring(0,idx) + '<span onmousemove="function(e){__comm(e, '+ comm_idx +')}" style="color:blue;">#' + comm_idx 
                       + '</span>' + html.substring(idx + 8);
                elm.innerHTML = html;
            }
            var popup = document.createElement("div");
            popup.style.position = 'absolute';
            popup.style.display = 'none';
            popup.id = '__commPopup';
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/06/05 12:33:01 - 2017-06-05
  2. 2017/06/05 12:29:47 - 2017-06-05
  3. 2017/06/05 12:28:11 - 2017-06-05
  4. 2017/06/05 12:26:32 - 2017-06-05
  5. 2017/06/05 12:25:23 - 2017-06-05
  6. 2017/06/05 12:24:51 - 2017-06-05
  7. 2017/06/05 12:22:41 - 2017-06-05
  8. 2017/06/05 12:21:36 - 2017-06-05
  9. 2017/06/05 12:16:17 - 2017-06-05
  10. 2017/06/05 12:14:09 - 2017-06-05
  11. 2017/06/05 12:13:18 - 2017-06-05
  12. 2017/06/05 12:12:52 - 2017-06-05
  13. 2017/06/05 12:11:02 - 2017-06-05
  14. 2017/06/05 12:06:54 - 2017-06-05
  15. 2017/06/05 12:06:19 - 2017-06-05
  16. 2017/06/05 12:05:11 - 2017-06-05
  17. 2017/06/05 12:03:13 - 2017-06-05
  18. 2017/06/05 11:58:27 - 2017-06-05
  19. 2017/06/05 11:56:36 - 2017-06-05
  20. 2017/06/05 11:55:45 - 2017-06-05