mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Update VE core submodule to master (cdfd84e)
New changes: c02ea46 Clarify documentation of directionality methods 43c9b6f Move initialisation browser support checking from downstream c89be66 Localisation updates from https://translatewiki.net. 5fb7907 Follow-up c89be66: Fix build for added language 'nan' fc74fab dm.ElementLinearData.compareElements: Add a few missed test cases Local changes: Use initialisation browser support checking from upstream Depends-On: I27a8e7b4376647f01cee648de987dc3ca6a060d5 Change-Id: I3fc79422ee5e487cf5fae3929fe492f21cd2840a
This commit is contained in:
parent
0f2ef11ca3
commit
cebaacb546
|
@ -68,6 +68,7 @@
|
|||
"ve.init",
|
||||
"ve.init.Platform",
|
||||
"ve.init.Target",
|
||||
"window.VisualEditorSupportCheck",
|
||||
"ve.init.sa*"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -123,6 +123,9 @@
|
|||
<!-- papaparse -->
|
||||
<script src="lib/ve/lib/papaparse/papaparse.js"></script>
|
||||
|
||||
<!-- visualEditor.supportCheck -->
|
||||
<script src="lib/ve/src/init/ve.init.SupportCheck.js"></script>
|
||||
|
||||
<!-- unicodejs -->
|
||||
<script src="lib/ve/lib/unicodejs/unicodejs.js"></script>
|
||||
|
||||
|
|
|
@ -246,6 +246,13 @@
|
|||
"mobile"
|
||||
]
|
||||
},
|
||||
"ext.visualEditor.supportCheck": {
|
||||
"scripts": "lib/ve/src/init/ve.init.SupportCheck.js",
|
||||
"targets": [
|
||||
"desktop",
|
||||
"mobile"
|
||||
]
|
||||
},
|
||||
"ext.visualEditor.desktopArticleTarget.init": {
|
||||
"class": "VisualEditorDesktopArticleTargetInitModule",
|
||||
"scripts": "modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js",
|
||||
|
@ -268,6 +275,7 @@
|
|||
"mediawiki.util",
|
||||
"mediawiki.api.options",
|
||||
"user.options",
|
||||
"ext.visualEditor.supportCheck",
|
||||
"ext.visualEditor.track"
|
||||
],
|
||||
"messages": [
|
||||
|
@ -845,7 +853,8 @@
|
|||
"rangefix",
|
||||
"papaparse",
|
||||
"jquery.client",
|
||||
"ext.visualEditor.base"
|
||||
"ext.visualEditor.base",
|
||||
"ext.visualEditor.supportCheck"
|
||||
],
|
||||
"messages": [
|
||||
"visualeditor",
|
||||
|
|
2
lib/ve
2
lib/ve
|
@ -1 +1 @@
|
|||
Subproject commit 33d090bc4e15e7936c3ac31956d8f0375c50b709
|
||||
Subproject commit cdfd84ea545250dfcc28bdfec011d808cc748951
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
( function () {
|
||||
var conf, tabMessages, uri, pageExists, viewUri, veEditUri, isViewPage, isEditPage,
|
||||
pageCanLoadVE, init, support, targetPromise, enable, tempdisable, autodisable,
|
||||
pageCanLoadVE, init, targetPromise, enable, tempdisable, autodisable,
|
||||
tabPreference, userPrefEnabled, initialWikitext, oldid, multipleSectionEditLinks,
|
||||
active = false,
|
||||
progressStep = 0,
|
||||
|
@ -303,36 +303,7 @@
|
|||
veEditUri.extend( { oldid: oldid } );
|
||||
}
|
||||
|
||||
support = {
|
||||
es5: !!(
|
||||
// It would be much easier to do a quick inline function that asserts "use strict"
|
||||
// works, but since IE9 doesn't support strict mode (and we don't use strict mode) we
|
||||
// have to instead list all the ES5 features we do use.
|
||||
Array.isArray &&
|
||||
Array.prototype.filter &&
|
||||
Array.prototype.indexOf &&
|
||||
Array.prototype.map &&
|
||||
Date.now &&
|
||||
Date.prototype.toJSON &&
|
||||
Object.create &&
|
||||
Object.keys &&
|
||||
String.prototype.trim &&
|
||||
window.JSON &&
|
||||
JSON.parse &&
|
||||
JSON.stringify &&
|
||||
Function.prototype.bind
|
||||
),
|
||||
contentEditable: 'contentEditable' in document.createElement( 'div' ),
|
||||
svg: !!(
|
||||
document.createElementNS &&
|
||||
document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect
|
||||
)
|
||||
};
|
||||
|
||||
init = {
|
||||
|
||||
support: support,
|
||||
|
||||
blacklist: conf.blacklist,
|
||||
|
||||
/**
|
||||
|
@ -628,11 +599,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
support.visualEditor = support.es5 &&
|
||||
support.contentEditable &&
|
||||
support.svg &&
|
||||
( ( 'vewhitelist' in uri.query ) || !$.client.test( init.blacklist, null, true ) );
|
||||
|
||||
// Cast "0" (T89513)
|
||||
enable = Number( mw.user.options.get( 'visualeditor-enable' ) );
|
||||
tempdisable = Number( mw.user.options.get( 'visualeditor-betatempdisable' ) );
|
||||
|
@ -656,7 +622,9 @@
|
|||
// Whether VisualEditor should be available for the current user, page, wiki, mediawiki skin,
|
||||
// browser etc.
|
||||
init.isAvailable = (
|
||||
support.visualEditor &&
|
||||
window.VisualEditorSupportCheck() &&
|
||||
|
||||
( ( 'vewhitelist' in uri.query ) || !$.client.test( init.blacklist, null, true ) ) &&
|
||||
|
||||
// Only in supported skins
|
||||
$.inArray( mw.config.get( 'skin' ), conf.skins ) !== -1 &&
|
||||
|
|
Loading…
Reference in a new issue