Currentlym if SomeUser moves its [[User:SomeUser/vector.js]] to [[User:SomeUser/common.js]], the vector page will receive the redirect code such as
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...