azatoth/twinkle — Issue #67: Do not use indexOf on arrays (breaks IE<9)
Author: mybugs
Created: 2011-10-25 19:29:18+00:00
State: open

Considering that IE<9 doesn't have an .indexOf() function for Array, could you replace all its uses by $.inArray?

On "morebits.js" there are two functions using indexOf on arrays. The code
result.indexOf( current ) === -1
from Array.prototype.uniq could be changed to
$.inArray( current, result ) === -1

Analogously, the code
uniques.indexOf( current ) === -1
from Array.prototype.dups could be changed to
$.inArray( current, uniques ) === -1

For more info, see:
* http://api.jquery.com/jQuery.inArray/
* http://stackoverflow.com/questions/3629183/why-doesnt-indexof-work-on-an-array-ie8
* https://en.wikipedia.org/w/index.php?title=MediaWiki_talk:Gadget-morebits.js&oldid=430976031#IndexOf_x_.24.inArray