Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/247028
Change subject: Avoid loading the old editor system if we can.
......................................................................
Avoid loading the old editor system if we can.
On page load we would load either ext.flow.editors.none
or ext.flow.editors.visualeditor in a separate request.
Since the old editor system is unused in most cases,
only do this if there is an old editor on the page.
Hopefully we will soon be able to remove the old
editor system entirely.
Change-Id: I07803792933a05091a85d30a06d9455ddb0a19ff
---
M modules/editor/ext.flow.editor.js
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/28/247028/1
diff --git a/modules/editor/ext.flow.editor.js
b/modules/editor/ext.flow.editor.js
index ab2e7a3..a81bf10 100644
--- a/modules/editor/ext.flow.editor.js
+++ b/modules/editor/ext.flow.editor.js
@@ -29,8 +29,11 @@
var editorList = mw.config.get( 'wgFlowEditorList' ),
index = editorList.indexOf( 'none' );
- // determine editor instance to use, depending on
availability
- mw.flow.editor.loadEditor( index );
+ // Only load the old editor system if there is an old
editor on the page
+ if ( $( '.flow-editor' ).length ) {
+ // determine editor instance to use, depending
on availability
+ mw.flow.editor.loadEditor( index );
+ }
},
loadEditor: function ( editorIndex ) {
--
To view, visit https://gerrit.wikimedia.org/r/247028
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I07803792933a05091a85d30a06d9455ddb0a19ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits