Index: trunk/extensions/SemanticForms/libs/SF_autoedit.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | $('.autoedit-trigger').click(function(){ |
11 | 11 | |
12 | | - if ( mw.config.get( 'wgUserName' ) == null ) { |
| 12 | + if ( wgUserName == null ) { |
13 | 13 | if ( confirm( sfgAnonEditWarning ) ) { |
14 | 14 | handleAutoEdit( this ); |
15 | 15 | } |
Index: trunk/extensions/SemanticForms/libs/SF_submit.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | var sacButtons; |
9 | 9 | var form; |
10 | 10 | |
11 | | - if ( mw.config.get( 'wgAction' ) === "formedit" || mw.config.get( 'wgCanonicalSpecialPageName' ) === "FormEdit" ) { |
| 11 | + if ( wgAction === "formedit" || wgCanonicalSpecialPageName === "FormEdit" ) { |
12 | 12 | |
13 | 13 | form = $('#sfForm'); |
14 | 14 | |
— | — | @@ -130,16 +130,16 @@ |
131 | 131 | |
132 | 132 | } |
133 | 133 | |
134 | | - if (mw.config.get( 'wgAction' ) == "formedit") { |
135 | | - params += "&target=" + encodeURIComponent( mw.config.get( 'wgPageName' ) ); |
136 | | - } else if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == "FormEdit") { |
| 134 | + if (wgAction == "formedit") { |
| 135 | + params += "&target=" + encodeURIComponent( wgPageName ); |
| 136 | + } else if ( wgCanonicalSpecialPageName == "FormEdit") { |
137 | 137 | |
138 | 138 | var url = String(window.location); |
139 | 139 | |
140 | 140 | var stop = url.indexOf("?"); |
141 | 141 | if ( stop > 0 ) url = url.substring(0, stop); |
142 | 142 | |
143 | | - var start = url.indexOf( mw.config.get( 'wgPageName' ) ); // find start of page name |
| 143 | + var start = url.indexOf( wgPageName ); // find start of page name |
144 | 144 | start = url.indexOf("/", start) + 1; // find start of subpage |
145 | 145 | |
146 | 146 | if ( start >= 0 ) { |
Index: trunk/extensions/SemanticForms/libs/SF_imagePreview.js |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | this.getPreviewImage = function( args, callback ) { |
14 | 14 | $.getJSON( |
15 | | - mw.config.get( 'wgScriptPath' ) + '/api.php', |
| 15 | + wgScriptPath + '/api.php', |
16 | 16 | { |
17 | 17 | 'action': 'query', |
18 | 18 | 'format': 'json', |
Index: trunk/extensions/SemanticForms/libs/SF_ajax_form_preview.js |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | function ajaxFormPreviewInit(){ |
13 | 13 | |
14 | | - if ((mw.config.get( 'wgNamespaceNumber' ) % 2 == 0) && /\.(js|css)$/.test(mw.config.get( 'wgTitle' ))) return; |
| 14 | + if ((wgNamespaceNumber % 2 == 0) && /\.(js|css)$/.test(wgTitle)) return; |
15 | 15 | |
16 | 16 | if(!document.getElementById('wikiPreview')) return; |
17 | 17 | |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | |
65 | 65 | //prepare |
66 | 66 | var action = document.URL; |
67 | | - if (mw.config.get( 'wgAction' )=='formedit') action += '&live'; |
| 67 | + if (wgAction=='formedit') action += '&live'; |
68 | 68 | |
69 | 69 | var boundary = '--------123xyz'; |
70 | 70 | var data = ''; |
— | — | @@ -253,6 +253,6 @@ |
254 | 254 | } |
255 | 255 | } |
256 | 256 | |
257 | | -if ( mw.config.get( 'wgAction' ) ==='formedit' || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'FormEdit' ) { |
| 257 | +if ( wgAction ==='formedit' || wgCanonicalSpecialPageName === 'FormEdit' ) { |
258 | 258 | jQuery( ajaxFormPreviewInit ); |
259 | 259 | } |