Skip to content

Instantly share code, notes, and snippets.

@to
Created May 8, 2010 08:01
Show Gist options
  • Save to/394440 to your computer and use it in GitHub Desktop.
Save to/394440 to your computer and use it in GitHub Desktop.
// ==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