Currentlym if SomeUser moves its [[User:SomeUser/vector.js]] to [[User:SomeUser/common.js]], the vector page will receive the redirect code such as
#REDIRECT [[User:SomeUser/common.js]]
which breaks the user scripts since this is not part of JS syntax (see a real case in the provided URL).
I think it is good idea to avoid this breakage somehow, e.g.:
- Do not redirect the JS and CSS pages when moved
- Add the redirect code /* inside of a comment */ (and make it work there, if it currently doesn't)
- Add some kind of "importScript" or "mw.loader.load" function instead of a redirect, so that if a user is importing the old page it will still get the content of the script
- Some other option...
Version: unspecified
Severity: normal
URL: https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=441581622#JavaScript_Problems
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=31827
https://bugzilla.wikimedia.org/show_bug.cgi?id=34930