From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- resources/mediawiki.action/mediawiki.action.edit.preview.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'resources/mediawiki.action/mediawiki.action.edit.preview.js') diff --git a/resources/mediawiki.action/mediawiki.action.edit.preview.js b/resources/mediawiki.action/mediawiki.action.edit.preview.js index cddf6ccf..602aadb0 100644 --- a/resources/mediawiki.action/mediawiki.action.edit.preview.js +++ b/resources/mediawiki.action/mediawiki.action.edit.preview.js @@ -102,6 +102,12 @@ } $( document ).ready( function () { + // Do not enable on user .js/.css pages, as there's no sane way of "previewing" + // the scripts or styles without reloading the page. + if ( $( '#mw-userjsyoucanpreview' ).length || $( '#mw-usercssyoucanpreview' ).length ) { + return; + } + // The following elements can change in a preview but are not output // by the server when they're empty until the preview reponse. // TODO: Make the server output these always (in a hidden state), so we don't -- cgit v1.2.2