Commit graph

18 commits

Author SHA1 Message Date
James D. Forrester 85e56bb200 Use QUnitTestModule instead of deprecated ResourceLoaderTestModules
Bug: T232875
Change-Id: I84276ff7c30b9c1db5dd8e9532512d7f586ab401
2020-05-11 20:19:57 +00:00
Fomafix b17c8b7557 Move check for 'usebetatoolbar' from JS to PHP
This change avoids useless loading of the module 'ext.CodeMirror'.

Change-Id: I2637487b72c028d272748f2891239401412f77b5
2020-02-23 20:50:17 +00:00
Derick Alangi 4b17eb952c Type hint &$defaultPreferences & clean onResourceLoaderTestModules
* Per https://www.mediawiki.org/wiki/Manual:Hooks/GetPreferences, it is
  strict on $preferences being an array, so type hinted it to conform.

* Remove legacy hook behavior for onResourceLoaderTestModules() hook in
  CodeMirrorHooks. See: https://w.wiki/3Az for more information. Also,
  added `@see` with link to the documentation of the hook used.

Change-Id: I0a2fac4b4d491abf8d2f661be32bf2e0d791c90b
2019-05-07 15:44:14 +01:00
Derick Alangi 5579001506 CodeMirrorHooks: Objects are passed by default as references
Documentation here: [[mw:Manual:Hooks/BeforePageDisplay]] also
says so about objects passed by defaults as references, no need
for the &.

Also, fixed onResourceLoaderTestModules() function header for the
$rl parameter, removed the & symbol and updated this hook's docs
here: [[mw:Manual:Hooks/ResourceLoaderTestModules]].

Change-Id: Ifdabc47a1a4f02aec4906edb800d360ca4febd76
2019-04-04 00:38:24 +01:00
Derick Alangi 3359cbde31 CodeMirrorHooks: Remove wgCodeMirrorEnabled set in mw.config JS
This was used for backward compatibility after beta support was removed
by MaxSem in I1ad451acfd163c783e7b (T185030). As a todo, this backcompat
was planned to be removed in 2019 :).

Bug: T219342
Change-Id: I35c77add8b4815a26b1bea2df90eaeae05a9a9f7
2019-04-02 23:44:02 +01:00
jenkins-bot fc4d4b0c36 Merge "Do not load module 'ext.CodeMirror' when CodeEditor is active" 2019-03-20 21:31:03 +00:00
Fomafix f0757cb0dc Do not load module 'ext.CodeMirror' when CodeEditor is active
Change-Id: I8fd0de727f2ebb1bf9f23981438d6cafa962ad17
2019-03-20 21:01:35 +00:00
Derk-Jan Hartman 758523b65f Conditionally load CodeMirror lib
Also remove two unneeded dependencies

Bug: T209824
Change-Id: I5b528bde346780ca5ae5d615c4ca0d617a6cd615
2019-03-14 23:31:18 +00:00
Umherirrender 7cd71f47a7 Remove @staticvar doc annotation
It is unknown to doxygen

Change-Id: I60e98eb3a7e74796e877fd70e8b9b67b5e3b60df
2018-09-09 20:04:35 +02:00
Kunal Mehta 35edfa6018 Use new Parser accessors
And there's no need to manually call firstCallInit() anymore, the
Parser will call it in all the necessary places automatically.

Depends-On: Ida62767f3ca53f99609cae01d3a20051bb92ccab
Depends-On: Ia2d98baf6caed2cd779cb00aceba5785cf13d633
Change-Id: I7e2097fa733506985a4b252fc9b01b03f6c28885
2018-08-13 22:56:03 -07:00
Kunal Mehta 0ba594b8ad Don't use deprecated MagicWord methods
Change-Id: I992b966f25cea52002cb8ee91f94dd92ff8c717f
2018-08-12 21:44:24 -07:00
Fomafix 9bda90be76 Get Parser from service instead of global $wgParser
Also always call firstCallInit() which already calls
initialiseVariables().

Change-Id: I55808175c18430a0021e115b27c672635a62669b
2018-08-12 10:34:00 +02:00
Fomafix ca7f33f8ef Use ContentLanguage service instead of global $wgContLang
Depends-On: I193f5b9a95430b0a05573c361715e053e5411e32
Change-Id: I2b6b2392c5be923657cd508459662ba643b21362
2018-08-05 00:33:03 +02:00
Max Semenik 63647bb5dc Remove all BetaFeatures support
Bug: T185030
Change-Id: I1ad451acfd163c783e7b8ec604d8695c14342667
2018-06-13 16:42:40 -07:00
James D. Forrester 780fe9cb9f Beta Feature: Flag as requiring JavaScript
Bug: T194528
Change-Id: Ic37fec8a167fe0c7a12ff52634824dd2585a9e80
2018-05-11 19:51:14 +00:00
Ed Sanders d4d92f921f Never load ext.CodeMirror on RTL pages
This does not affect the VE integration, which
does support RTL.

Bug: T191923
Change-Id: I817498157bcc3ff0b92d1ee0e9cf9fc96be83d2f
2018-04-19 16:01:57 +00:00
MusikAnimal 4d2783eb3e Tests for MediaWiki CodeMirror syntax highlighting
Bug: T169592
Change-Id: I0750d3a320af5451f847e6062f82523fb18f12bc
2018-03-20 16:27:55 -04:00
Kunal Mehta f7e5949334 Move classes into includes/
Depends-On: Idbcb76f54eb57b0a56b46188526858038d698627
Change-Id: I2858e848137336aeabb18513f073bfccf64c0a6b
2018-02-10 09:27:42 +00:00