summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js')
-rw-r--r--extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js b/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
index ca88c79a..5381e605 100644
--- a/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
+++ b/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
@@ -1,5 +1,6 @@
/* Publish module for wikiEditor */
-( function( $ ) { $.wikiEditor.modules.previewDialog = {
+/*jshint onevar:false */
+( function ( $, mw ) { $.wikiEditor.modules.previewDialog = {
/**
* Compatability map
@@ -29,7 +30,7 @@ fn: {
* @param context Context object of editor to create module in
* @param config Configuration object to create module from
*/
- create: function( context, config ) {
+ create: function( context ) {
// Build the dialog behind the Publish button
var dialogID = 'wikiEditor-' + context.instance + '-preview-dialog';
$.wikiEditor.modules.dialogs.fn.create(
@@ -78,7 +79,7 @@ fn: {
.css( 'top', '25px' );
// $dialog.dialog( 'option', 'width', $( 'body' ).width() - 300 );
// Aborts when nothing has changed since the last preview
- if ( context.modules.preview.previewText == wikitext ) {
+ if ( context.modules.preview.previewText === wikitext ) {
return;
}
@@ -96,9 +97,9 @@ fn: {
},
function( data ) {
if (
- typeof data.parse == 'undefined' ||
- typeof data.parse.text == 'undefined' ||
- typeof data.parse.text['*'] == 'undefined'
+ typeof data.parse === 'undefined' ||
+ typeof data.parse.text === 'undefined' ||
+ typeof data.parse.text['*'] === 'undefined'
) {
return;
}
@@ -128,4 +129,4 @@ fn: {
}
}
-}; } )( jQuery );
+}; } )( jQuery, mediaWiki );