MediaWiki talk:Common.js

From OpenWetWare
Revision as of 12:53, 3 May 2015 by Amine Maddah (talk | contribs) (forgot sig)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Problem with string cast

Hi,

First of all, I want to really thank you for this script, it is a really nice one :D

It seems that the variable elem.className is not anymore considerate naturally as a string <source lang="javascript"> var elemClasses = elem.className.split(' '); </source>

And it is necessary to cast it to a string with toString method : <source lang="javascript"> var elemClasses = elem.className.toString().split(' '); </source>

I do not know exactly why, but I noticed it with chrome console.

Thanks for your attention.

Amine Maddah