I'm kinda new to Userscripts and JavaScript in general, and I'm pretty lost.
Basically what I want to do is go through elements I got by using getElementsByClassName, get the data in the "name" attribute, see if it contains something and if so, change the class name to something else.
In pseudo-ish-code:
items = getElementsByClassName("item1");
for each item in items {
if(item.attribute("name").contains("Hi"))
item.attribute("class") = "item2";
}
If someone could give me some tips on how I could do this, that'd be awesome.