Created
May 8, 2010 08:01
-
-
Save to/394440 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name LDR - Feed Filter | |
// @namespace http://github.com/to | |
// @include http://reader.livedoor.com/reader/ | |
// ==/UserScript== | |
var FILTERS = [ | |
function(c){ | |
if(/zLLQDaZE3hGdsj811ZzWFw/.test(c.feedlink)) | |
c.title = c.feedlink.replace(/.*username=(.*)/, 'Soundcloud: $1'); | |
}, | |
]; | |
addBefore(unsafeWindow.Subscribe.Model.prototype, 'load_data', filter); | |
function filter(list){ | |
FILTERS.forEach(function(f){ | |
list.forEach(f); | |
}); | |
} | |
function addBefore(target, name, before) { | |
var original = target[name]; | |
target[name] = function() { | |
before.apply(this, arguments); | |
return original.apply(this, arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment