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

           Summary: Include the functionality of importScript into
                    mediaWiki.loader.load
           Product: MediaWiki
           Version: wikimedia-deployment
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Resource Loader
        AssignedTo: tpars...@wikimedia.org
        ReportedBy: listenle...@gmail.com
                CC: roan.katt...@gmail.com


According to
http://www.mediawiki.org/wiki/ResourceLoader/JavaScript_Deprecations#wikibits.js
importScript should be replaced by mediaWiki.loader.load in the future, but at
the moment it's not a good substitute. If you want a script to be loaded both
via http or https depending you have to replace
  importScript('User:Foo/bar.js');
by
  mediaWiki.loader.load(mediaWiki.config.get('wgServer') +
mediaWiki.config.get('wgScript') +
'?title=User:Foo/bar.js&action=raw&ctype=text/javascript');

Another user suggested the syntax
  mediaWiki.loader.load('[[User:Foo/bar.js]]');

This has two advantages: It doesn't conflict with names of modules and it
generates an entry in "What links here".

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

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to