Skip to content

Instantly share code, notes, and snippets.

@negipo
Created September 3, 2009 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save negipo/180327 to your computer and use it in GitHub Desktop.
Save negipo/180327 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name FavotterUncensored
// @namespace http://polog.org/
// @include http://favotter.matope.com/*
// @require http://gist.github.com/3242.txt
// @require http://dl.getdropbox.com/u/275354/lib/favotter_denied_keywords.js
// ==/UserScript==
var denied_keywords = favotter_denied_keywords();
var denied_keywords_length = denied_keywords.length;
function init(doc){
$X('descendant-or-self::span[@class="censored"]', doc).forEach(function(e){
uncensored(e, Math.floor(Math.random() * denied_keywords_length));
});
}
function uncensored(e, i){
if(i >= denied_keywords_length)
i = 0;
e.innerHTML = denied_keywords[i];
setTimeout(function(){uncensored(e, i+=1)}, 100);
}
init(document);
document.body.addEventListener('AutoPagerize_DOMNodeInserted',function(evt){
var doc = evt.target;
init(doc);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment