Skip to content

Instantly share code, notes, and snippets.

@evadne
Created March 24, 2010 19:10
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 evadne/342661 to your computer and use it in GitHub Desktop.
Save evadne/342661 to your computer and use it in GitHub Desktop.
// var%20jQueryScriptTag%20=%20document.createElement(%27script%27);jQueryScriptTag.setAttribute(%27src%27,%20%27http://jquery.com/src/jquery-latest.js%27);document.getElementsByTagName(%27body%27)[0].appendChild(jQueryScriptTag);jQueryScriptTag.onload%20=%20function(){jQuery.noConflict();var%20eradicate%20=%20[%27%E6%97%A9%E5%AE%89%27,%20%27%E5%8D%88%E5%AE%89%27,%20%27%E6%99%9A%E5%AE%89%27];jQuery(%27.plurk_cnt%27).each(function(key,%20object){var%20plurkObject%20=%20jQuery(object);var%20plurkObjectContainsText%20=%20String(plurkObject.text());for%20(keyEradication%20in%20eradicate)if(plurkObjectContainsText.match(eradicate[keyEradication])%20!=%20null)plurkObject.closest(%22.plurk%22).fadeOut(400).remove();});}
var jQueryScriptTag = document.createElement('script');
jQueryScriptTag.setAttribute('src', 'http://jquery.com/src/jquery-latest.js');
document.getElementsByTagName('body')[0].appendChild(jQueryScriptTag);
jQueryScriptTag.onload = function(){
jQuery.noConflict();
var eradicate = ['早安', '午安', '晚安'];
jQuery('.plurk_cnt').each(function(key, object){
var plurkObject = jQuery(object);
var plurkObjectContainsText = String(plurkObject.text());
for (keyEradication in eradicate)
if (plurkObjectContainsText.match(eradicate[keyEradication]) != null)
plurkObject.closest('.plurk').fadeOut(400).remove();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment