summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
commit224b22a051051f6c2e494c3a2fb4adb42898e2d1 (patch)
tree85a41a4cf8533bf740ec4c8d3affce88414daa56 /extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
parent9937b8e6d6a8b4517c04c143daaf9ebd42ce8ba0 (diff)
Update to MediaWiki 1.22.1
Diffstat (limited to 'extensions/WikiEditor/modules/jquery.wikiEditor.preview.js')
-rw-r--r--extensions/WikiEditor/modules/jquery.wikiEditor.preview.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js b/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
index 372d2e8e..39907364 100644
--- a/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
+++ b/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
@@ -1,6 +1,6 @@
/* Preview module for wikiEditor */
( function ( $, mw ) {
-/*jshint onevar:false */
+
$.wikiEditor.modules.preview = {
/**
@@ -32,7 +32,7 @@ fn: {
* @param context Context object of editor to create module in
* @param config Configuration object to create module from
*/
- create: function ( context ) {
+ create: function ( context, config ) {
if ( 'initialized' in context.modules.preview ) {
return;
}
@@ -65,9 +65,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;
}
@@ -89,7 +89,7 @@ fn: {
// Gets the latest copy of the wikitext
var wikitext = context.$textarea.textSelection( 'getContents' );
// Aborts when nothing has changed since the last time
- if ( context.modules.preview.changesText === wikitext ) {
+ if ( context.modules.preview.changesText == wikitext ) {
return;
}
context.$changesTab.find( 'table.diff tbody' ).empty();
@@ -115,9 +115,8 @@ fn: {
rvprop: ''
};
var section = $( '[name="wpSection"]' ).val();
- if ( section !== '' ) {
+ if ( section !== '' )
postdata2.rvsection = section;
- }
$.post( mw.util.wikiScript( 'api' ), postdata2, function ( data ) {
// Add diff CSS