In wikibits.js on line 367 or so, there are two for loops that use the for..in
mechanism to loop through arrays. Since these are arrays and not objects they
should be looped through using plain for loops. Using for..in causes problems
when you include javascript libraries like older versions of prototype that mess
with Object.prototype.
To see the fun bugs it causes, try including prototype in your skin and look at
the edit toolbar.
To fix this, change:
for(i in mwEditButtons) {
to:
for (var i = 0; i < mwEditButtons.length; i++) {
and:
for(i in mwCustomEditButtons) {
to:
for (var i = 0; i < mwCustomEditButtons.length; i++) {
For further information about properly iterating arrays in javascript see:
http://simon.incutio.com/slides/2006/etech/javascript/js-reintroduction-notes.html#arrays
Version: 1.8.x
Severity: minor