MediaWiki REL1_33
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Go to the documentation of this file.
1<?php
20
21 protected $targets = [ 'desktop', 'mobile' ];
22
28 $scripts = parent::getScript( $context );
29
30 return $scripts . Xml::encodeJsCall(
31 've.dm.MWSyntaxHighlightNode.static.addPygmentsLanguages', [
33 ],
34 ResourceLoader::inDebugMode()
35 ) . Xml::encodeJsCall(
36 've.dm.MWSyntaxHighlightNode.static.addGeshiToPygmentsMap', [
38 ],
39 ResourceLoader::inDebugMode()
40 ) . Xml::encodeJsCall(
41 've.dm.MWSyntaxHighlightNode.static.addPygmentsToAceMap', [
43 ],
44 ResourceLoader::inDebugMode()
45 );
46 }
47
52 private function getPygmentsLanguages() {
53 return array_keys( require __DIR__ . '/../SyntaxHighlight.lexers.php' );
54 }
55
59 public function enableModuleContentVersion() {
60 return true;
61 }
62
66 public function supportsURLLoading() {
67 return false;
68 }
69}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Object passed around to modules which contains information about the state of a specific loader reque...
ResourceLoader module based on local JavaScript/CSS files.
array $scripts
List of paths to JavaScript files to always include.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2848