Sometimes, various projects will have scripts that are designed for sysops only, and they carry no functionality for regular users. Being able to separate these from Common.js and thus reduce loading times for non-sysops would be a good benefit.
Easiest method requires adding a new method to Skin.php/SkinTemplate.php called getSysopJs(), and the patch for RawPage.php would be as follows:
Index: RawPage.php
- RawPage.php (revision 24329)
+++ RawPage.php (working copy)
@@ -153,6 +153,7 @@
return $sk->getUserStylesheet(); } else if($this->mGen == 'js') { return $sk->getUserJs();
+ return $sk->getSysopJs();
} } else { return $this->getArticleText();
Version: 1.11.x
Severity: enhancement