Last modified: 2014-11-17 10:34:49 UTC
I'm opening this bug because I agree with what is requested at bug 32858: the JS and CSS pages should NOT be parsed as if they were normal "wiki pages" (at least NOT by default, i.e., only if the user opted in for such wiki-parsing). If someone fix that bug, though, the users who create user scripts will have no other hack to track the (crosswiki) usage of their code, and won't be able to notify users about possibly breaking changes in new versions of some JS code. As you can check on [[commons:Special:WhatLinksHere/Template:GlobalJsUsage]], some people also use fake [[File:UserName UserScript.js]] pages to be able to get a list from [[Special:GlobalUsage]] for the associated scripts (see also Bug 1886) MediaWiki needs a proper way to deal with tracking user scripts.
RL2/the gadgets rewrite should fix a lot of this...
(In reply to comment #1) > RL2/the gadgets rewrite should fix a lot of this... Would that also work for JS/CSS files in userspace and the Project: namespace?
(In reply to comment #1) > RL2/the gadgets rewrite should fix a lot of this... Well, it makes it redundant to have to update import-calls as the gadget will be centrally stored. But we don't yet provide a way to see how many people have certain gadgets enabled. This info is available in the database, but not in an efficient way (major wikis make weekly dumps of this from the Toolserver on a wiki page like https://commons.wikimedia.org/wiki/Commons:Database_reports/User_preferences#Gadgets ) (In reply to comment #2) > (In reply to comment #1) > > RL2/the gadgets rewrite should fix a lot of this... > > Would that also work for JS/CSS files in userspace and the Project: namespace? No, and we don't have to in my opinion. Right now the habbit is for script to be copied and pasted or live-imported on load time from one user or wiki to another. That causes two needs: * Being able to track usage so that in case of changes, they can be updated * Statistics, how many people are using X The goal is to remove that habbit, and instead have people write much more as gadgets, which allows re-use of code and asynchronous loading with other modules as well as much better internationalization and an easier for the users (no need to dive into code but just ticking checkboxes on Special:Preferences). Both of these needs are still valid though. the first one is redundant by using Gadgets since then code is stored and loaded from 1 central location, removing the need for updates. The statistics is something we should still think about. For now the Wikimedia wiki's can do with database report bots, but ideally we'd have something like this in core or in an extension.
Renaming bug summary to aim for fixing the need for the way scripts are encourages to be written today and in the future, not the way they were being written up to last year.
Unless something has changed since my involvement decreased, at least on the English Wikipedia, there's a pretty big barrier (of inertia if nothing else) to getting new gadgets added - I really can't see gadgets becoming the preferred method of creating userscripts unless and until that is changed. Until that happens (and even after, for quite some time, given the extant body of non-gadget scripts), we still need some method of tracking script usage.
(In reply to comment #5) > Unless something has changed since my involvement decreased, at least on the > English Wikipedia, there's a pretty big barrier (of inertia if nothing else) to > getting new gadgets added - I really can't see gadgets becoming the preferred > method of creating userscripts unless and until that is changed. Until that > happens (and even after, for quite some time, given the extant body of > non-gadget scripts), we still need some method of tracking script usage. Well, if we're talking about a new feature. Then I don't think there's a need to support user scripts (if that's possible in a good way at all). If you're referring to /* [[links]] */ and Special:WhatLinksHere.. well, I'd say keep using that until gadgets are the common way for creating scripts.