Skip to content

Instantly share code, notes, and snippets.

@undergroundmonorail
Created January 8, 2015 01:39
Show Gist options
  • Save undergroundmonorail/e1b185c4c3d093b4ee92 to your computer and use it in GitHub Desktop.
Save undergroundmonorail/e1b185c4c3d093b4ee92 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Orange Neopet Health
// @namespace http://www.reddit.com/u/undergroundmonorail
// @version 0.1
// @description yellow is hard to read. make your neopet's worrying-but-not-critical health show up orange instead
// @author monorail
// @match http://www.neopets.com/*
// ==/UserScript==
(function(){
a = $('.activePetInfo');
a.html(a.html().replace(/(<font color=")yellow("><b>\d+ \/ \d+<\/b><\/font>)/, '$1orange$2'));
})();
@matchu
Copy link

matchu commented Jan 8, 2015

You can drop the regexes by leveraging jQuery a bit more:

$('.activePetInfo font[color=yellow]').attr('color', 'orange');

@undergroundmonorail
Copy link
Author

woah, sweet. i'd literally never used jquery before. good to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment