Hatena::Let spam filter

    
      
  • /*
     * @title Hatena::Let SPAM Filter
     * @description Hatena::Let の一覧から SPAM 投稿を消す(やっつけだけど)
     * @include http://let.hatelabo.jp/*
     * @license MIT License
     * @javascript_url
     */
    (function () {
        var forEach = Array.prototype.forEach;
        var re1 = /^(https?:)+\s*$/,
            re2 = /(https?:){2,}/;
        var wipeout = function(ctx) {
            forEach.call(document.body.querySelectorAll('div.codelist'), function (item) {
                var source_block = item.querySelectorAll('pre.packed-source');
                if (source_block.length == 0) {
                    item.style.display = 'none';
                    return;
                }
                var source = source_block[0];
                if (re1.exec(source.textContent) || re2.exec(source.textContent)) {
                    item.style.display = 'none';
                    return;
                }
            });
        };
        wipeout(document.body);
    })();
    
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2016/03/07 07:39:00 - 2016-03-07
  2. 2016/03/07 07:37:57 - 2016-03-07
  3. 2016/03/05 06:16:09 - 2016-03-05
  4. 2016/03/05 06:15:41 - 2016-03-05
  5. 2016/03/05 06:12:33 - 2016-03-05
  6. 2016/03/04 06:22:33 - 2016-03-04
  7. 2016/03/03 02:33:38 - 2016-03-03
  8. 2016/01/26 04:50:53 - 2016-01-26
  9. 2016/01/26 04:49:41 - 2016-01-26
  10. 2016/01/22 04:52:50 - 2016-01-22
  11. 2016/01/18 07:21:15 - 2016-01-18
  12. 2016/01/18 07:05:42 - 2016-01-18
  13. 2016/01/18 06:18:05 - 2016-01-18
  14. 2016/01/10 03:18:07 - 2016-01-10
  15. 2016/01/05 06:58:38 - 2016-01-05
  16. 2016/01/04 03:43:02 - 2016-01-04
  17. 2016/01/04 03:28:07 - 2016-01-04
  18. 2016/01/04 03:20:18 - 2016-01-04
  19. 2016/01/04 03:19:14 - 2016-01-04