https://bugzilla.wikimedia.org/show_bug.cgi?id=30074

       Web browser: ---
             Bug #: 30074
           Summary: Moving [[User:SomeUser/vector.js]] to
                    [[User:SomeUser/common.js]] shoudn't cause JavaScript
                    errors
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL:
                    https://secure.wikimedia.org/wikipedia/en/w/index.php?
                    title=Wikipedia:Village_pump_(technical)&oldid=4415816
                    22#JavaScript_Problems
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Javascript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


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...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to