summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js
diff options
context:
space:
mode:
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 );