del.icio.us の links for がうざいので消去するよ @ livedoor Reader

blog のフィードに del.icio.us にブックマークしたものをまぜて配信する人がいるけど鬱陶しいので消去してみるよ。

// ==UserScript==
// @name      ldr filter feed from del.icio.us
// @namespace http://opera.higeorange.com/
// @include   http://reader.livedoor.com/reader/*
// ==/UserScript==

(function(w) {
    w.register_hook("AFTER_PRINTFEED", function(feed) {
        var ngword = /^links\sfor/i;
        feed.items.forEach(function(item) {
            if(ngword.test(item.title)) {
                (function(id) {
                    var self = arguments.callee;
                    try {
                        w.close_item(id);
                    } catch (e) {
                        setTimeout(function() { self(id) }, 500);
                    }
                })(item.id);
            }
        });
    });
})(this.unsafeWindow || window);


タイトルが links for … で始まるエントリを表示しないようにしてる。..と思う。