Sepehr Sadighpour wrote:
Hello!
I'd like to add javascript to to the search page of mediawiki. It would be a huge bonus if this script could be loaded only for logged in admin users, so I could test it before rolling it out. How can I go about this without messing with core files, if indeed the special search page is considered to be a core file?
Thanks in advance, Sepehr
Write it in MediaWiki:Sysop.js
As it is not yet on any release, you will also need to add to MediaWiki:Common.js:
function userInGroup(group) { return (wgUserGroups && (('|' + wgUserGroups.join('|') + '|').indexOf('|' + group + '|') != -1)); } if (userInGroup('sysop')) importScript("MediaWiki:Sysop.js");