On 11 January 2012 21:27, Daniel Barrett <danb(a)vistaprint.com> wrote:
In 1.18.0, the page Special:UserLogin no longer runs
MediaWiki:common.js. Is this an intentional change from 1.17, and if so,
is there a workaround to make custom JS run on the login page?
(I tested this by putting alert('foo') in MediaWiki:common.js. The alert
appears on all articles & special pages except Special:UserLogin.)
Yes, no user-editable scripts are run on pages where password forms reside,
because it is trivially easy for users to use them to introduce
password-sniffing JS attacks, either deliberately or inadvertantly. Or
that's the idea, at least; IIRC there's an open bug about gadgets running
somewhere they probably shouldn't, etc.
You could probably hack around it by using one of the many hooks in the
page rendering stack to add the JS module on the pages where it's not
already there, but before doing so it's worth thinking about the reason why
it was removed in the first place.