https://bugzilla.wikimedia.org/show_bug.cgi?id=29584
Web browser: ---
Bug #: 29584
Summary: mw.loader.load extended to accept internal links
Product: MediaWiki
Version: 1.19-svn
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: Javascript
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
I extended the mw.loader.load function to automatically detect internal links,
for example "User:Edokter/MenuToTabs.js", as a substitute for importScript and
importStylesheet. It does so by examining the extension first to see if it is
an URL or a module. It then checks for "http://" or "https://" and builds a
full link if is internal.
A possible improvement would be to use load.php directly instead of linking to
index.php for internal links.
This patch works under the assumption that a module name never ends with ".css"
or ".js". If that is not the case, then discard this patch. Another function
would then have to be added.
--
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