![]() ![]() */ /* global mw, $, importStylesheet, importScript */ /* jshint curly:false eqnull:true, strict:false, browser:true, */ mw. In case a * dependency hasn't arrived yet it'll make sure those are loaded before this. MediaWiki-ResourceLoader (Accepted Enhancement) User-notice (Not ready to announce) Performance-Team (Radar) (Perf recommendation) MW-1.39-notes (1.39.0-wmf.21 ) Referenced Files None Subscribers Aklapper DannyS712 Krinkle Quiddity Description The module jquery.hoverIntent is never loaded or referred to ( codesearch ). In most cases these dependencies will * be loaded (or loading) already and the callback will not be delayed. JavaScript code from Common.js is only loaded if the wgUseSiteJs is enabled. For example, here's the MediaWiki:Common.js page on the English Wikipedia. Note that this is not a file, but simply a page you can edit (as an administrator) on your wiki. The system message MediaWiki:Common.js can contain JavaScript code that is inserted into every wiki page as it renders. However, unlike local articles, external articles require the use of a prefix and community name to determine which community you will be importing them from and how you will identify that community. There are also pandoc filter libraries in PHP, perl, and JavaScript/node.js. As garryp has already suggested, you can put the JavaScript code into MediaWiki:Common.js. MediaWiki:Common.js External articles Articles from external communities can also be located the same way that you would link to them normally. ![]() The last one was recommended in the help file, but I suggest not to use User:MarkS for that. If possible create a gadget that is * enabled by default instead of adding it here (since gadgets are fully * optimized ResourceLoader modules with possibility to add dependencies etc.) * * Since Common.js isn't a gadget, there is no place to declare its * dependencies, so we have to lazy load them with mw.ing on demand and * then execute the rest in the callback. markdownstrict (original unextended Markdown) mediawiki (MediaWiki. You could locate them anywhere in your server's file system, on a wiki page in the MediaWiki: namespace (only admins can edit) or on a user subpage that ends in. /** * Keep code in MediaWiki:Common.js to a minimum as it is unconditionally * loaded for all users on every wiki page. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |