MediaWiki talk:Common.js

From OpenWetWare
Jump to: navigation, search

Problem with string cast


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