t3dotgg / Chrometana

Redirect Bing Somewhere Better
http://Chrometana.Theo.li
MIT License
74 stars 15 forks source link

Use class list opposed to using the classname string #19

Closed kyleladd closed 8 years ago

kyleladd commented 8 years ago

image This is caused because the add is adding a space that is not being trimmed. Opposed to using classname (String), it is better to use classlist (List Object).

http://www.w3schools.com/jsref/prop_element_classlist.asp

.remove Removes one or more class names from an element.Note: Removing a class that does not exist, does NOT throw an error
.add Adds one or more class names to an element.If the specified class already exist, the class will not be added
t3dotgg commented 8 years ago

Okay I get it I suck at coding