[WikiEN-l] User script inclusion (was: Watchlist feature requests)

Ilmari Karonen nospam at vyznev.net
Mon May 8 22:14:27 UTC 2006

Steve Bennett wrote:
> On 03/05/06, Alphax (Wikipedia email) <alphasigmax at gmail.com> wrote:
>>Oh yes, there's
>>http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts on en:
>>which has a heap of these sort of things (somewhere). I've crosslinked them.
> It would be cool if there was a simple way where a user could click to
> include all these functionalities. They're quite modular, and often
> don't conflict with each other. So wouldn't it be nice if you could
> just click to include some code, rather than copy-pasting. Personally,
> I find after about 3-4 functions included, my monobook.js is totally
> out of control. Or maybe it's possible to {transclude} subpages to
> make it tidier?

There's [[Template:Js]], which unfortunately is rather underpublicized. 
  You use it by adding {{subst:js|Script to include}} to your 
monobook.js; it expands to the code posted by Pete Bartlett.  You may 
also want to look at my own monobook.js for a slightly more compact 


Of course, you probably shouldn't include the unprotected versions at 
[[Wikipedia:WikiProject User scripts]] directly.  I've been thinking for 
a while that the project ought to provide "stable" protected versions of 
each script for ease of inclusion.

One possibility might be to register a dummy user account, such as 
User:Scripts, for this purpose, and maintain the stable versions as js 
subpages of that user.  Besides providing shorter page names, that would 
guarantee that the stable versions are always protected.

I think I'll propose something like this at [[Wikipedia talk:WikiProject 
User scripts]].  Of course, any such stable version system requires 
admins to promptly merge in any valid changes, but it seems to me that 
there are enough active admins on that project to make this feasible. 
There probably also ought to be an easy way for users to list their 
personal forks of each script.

I think I'll sleep on it, and write up a proposal tomorrow.

Ilmari Karonen

More information about the WikiEN-l mailing list