Skip to content

Instantly share code, notes, and snippets.

@negipo
Created April 7, 2009 02:38
Show Gist options
  • Save negipo/91068 to your computer and use it in GitHub Desktop.
Save negipo/91068 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name PoupeegirlRibbonFilter
// @include http://pupe.ameba.jp/cute/community/goods*
// @require http://gist.github.com/3242.txt
// ==/UserScript==
var threshold = 5;
function filter(doc){
$X('descendant-or-self::ul[@class="list"]/li', doc).forEach(function(e){
var ribbons = parseInt(/[\d,]+/.exec($X('descendant-or-self::span[@class="ribbon"]', e)[0].innerHTML)[0].replace(/,/g, ""));
if(ribbons > threshold)
e.style.display = 'none';
});
}
filter(document);
setTimeout(function(){
if (window.AutoPagerize && window.AutoPagerize.addDocumentFilter) {
window.AutoPagerize.addDocumentFilter(filter);
}
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment