MediaWiki talk:Gadget-morebits.js

This is an old revision of this page, as edited by Amalthea (talk | contribs) at 11:03, 19 May 2011 (IndexOf x $.inArray: re This, that and the other, and editprotected done). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 14 years ago by Amalthea in topic IndexOf x $.inArray

Could a friendly admin please copy the contents of User:This, that and the other/temp/MediaWiki:Gadget-morebits.js to this page? I am currently in the process of testing this gadget script. — This, that, and the other (talk) 08:09, 16 May 2011 (UTC)Reply

Friendly admin gladly complies. Amalthea 10:10, 16 May 2011 (UTC)Reply


IndexOf x $.inArray

Wouldn't be better to change

mw.config.get( 'wgUserGroups' ).indexOf( group ) !== -1

to

$.inArray(group, mw.config.get( 'wgUserGroups' ))

to ensure cross-browser support? Helder 13:55, 18 May 2011 (UTC)Reply

I have no idea. But as there is no opposition I have made the change for you. — Martin (MSGJ · talk) 10:14, 19 May 2011 (UTC)Reply
Fair enough. Personally, I think it's a performance decrease, and doesn't really improve legibility. But, that aside, any changes to this page are likely to get unintentionally overwritten, unless Twinkle maintainers get a heads-up at WT:TW. — This, that, and the other (talk) 10:40, 19 May 2011 (UTC)Reply
Helder's point was mainly browser compatibility, I think: IE8 doesn't support JS 1.6 and thus doesn't know Array.indexOf.
Don't know how many other problems morebits has in IE8 (and older), of course. Amalthea 11:03, 19 May 2011 (UTC)Reply

Actually, that change broke stuff. Could an admin please revert it? Thanks, — This, that, and the other (talk) 10:57, 19 May 2011 (UTC)Reply

Done. Amalthea 11:03, 19 May 2011 (UTC)Reply