From db1fb276a0563168a4ffe8e477ff2c5751025aa2 Mon Sep 17 00:00:00 2001 From: Seb35 Date: Sat, 1 Sep 2018 13:03:49 +0200 Subject: [PATCH] Do not display editor on non-wikitext pages The editor is displayed on 'Sanitized CSS' pages (template pages ending with .css), it should not because it is not interpreted as wikitext and tags are not recognised. Change-Id: I58195de1ae54252d57e1cd912ee52801a093729e --- modules/ext.templateDataGenerator.editPage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ext.templateDataGenerator.editPage.js b/modules/ext.templateDataGenerator.editPage.js index e35eed67..7f688835 100644 --- a/modules/ext.templateDataGenerator.editPage.js +++ b/modules/ext.templateDataGenerator.editPage.js @@ -11,7 +11,9 @@ $( function () { // Check if we're in the proper namespace - if ( mw.config.get( 'wgCanonicalNamespace' ) !== 'Template' ) { + if ( mw.config.get( 'wgCanonicalNamespace' ) !== 'Template' || + mw.config.get( 'wgPageContentModel' ) !== 'wikitext' + ) { return; }