Greasemonkey FTW

// ==UserScript==
// @name           Get Medieval
// @namespace      http://get-medieval.livejournal.com/
// @description    Fixes broken comic images.
// @include        http://get-medieval.livejournal.com/
// ==/UserScript==

var images = document.getElementsByTagName('img');
for (var i in images){
	var src = new String(images[i].src);
	if (src.match(/ainself.net/)){
		if (!src.match(/gif/)){
			src = src + '.gif';
			images[i].src = src;
		}
		break;
	}
}

Yeah, my Javascript sucks, but… yay! I can finish reading the archive again! šŸ™‚

About nfg

100% not a communist
This entry was posted in Code and tagged , . Bookmark the permalink.

6 Responses to Greasemonkey FTW

  1. Gavin says:

    that code looks soooo familiar.. almost like the one I wrote for work..hrmmm.

  2. Gavin says:

    You should upload it to User Scripts so others can use it too.

    ps, why are my gravatars not showing up.

  3. nfg says:

    I’ll take that as a compliment. šŸ™‚ That said, I wrote it from scratch. It took much googling.

    And is there gravatar support set up? I didn’t see any plugins, or any settings that looked like they’d enable ’em.

  4. Gavin says:

    yea, turns you your gravatar setting (under discussion) is set to ‘G’, and my icon is ‘PG’ šŸ™

  5. nfg says:

    Ah! There. Now your obscene user picture appears. I, sir, am disgusted.

Comments are closed.