MediaWiki talk:Common.js: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
m (pb string cast)
 
(forgot sig)
 
Line 17: Line 17:


Thanks for your attention.
Thanks for your attention.
[[User:Amine Maddah|Amine Maddah]]

Latest revision as of 12:53, 3 May 2015

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