Tuesday, January 1, 2013

TamperMonkey / GreaseMonkey Script

In an attempt to make r/minimalism a little...less cluttered, I wrote this tampermonkey/greasemonkey script, would like to add more but I haven't figured our just what yet. Would love to see if anyone has any improvement. This is more of an effort to get the ball rolling than an actual attempt at reskinning, you guys have better eyes than me.

// ==UserScript==
// @name       r/minimalism
// @namespace  http://use.i.E.your.homepage/
// @version    0.1
// @description  Minimizing Minimalism
// @match      http://www.reddit.com/r/minimalism/
// @copyright  2012+, You
// ==/UserScript==
var $ = unsafeWindow.jQuery;
$('.domain').each(function (){
if (/self\.minimalism/.test($(this).html())){
  $(this).html('(self)');
} 
}
                 );
$('.tagline').each(function (){
if (/(hour|minute)/.test($(this).html())){
  $(this).html('submitted recently');
}
}
                  );
$('#siteTable').attr("align","center");

No comments: