I've been trying to gin up a small Greasemonkey script, that takes the content of a class and changes it to another class.
Basically it would change:
<ul class='user_type_1'>
into:
<ul class='administrator'>
But, I'm completely green to javascript & Greasemonkey, and all the research I did just left me even more confused.
Ideally I would like someone to explain in detail HOW I achieve this, instead of just handing over a script that works (though currently even that would be a help).
This is super-easy with jQuery (a javascript utility/library). jQuery provides the functions
addClass()
andremoveClass()
, to make this a snap.Here is a complete, Firefox Greasemonkey, script that changes that class: