User:Cacycle/wikEd dev.js: Difference between revisions

Content deleted Content added
test
No edit summary
Line 14,626:
// prepare the url
var requestUrl;
if ( (wikEd.uploadEdit =!= true) ||&& (wikEd.watchlistEdit =!= true) ||&& (wikEd.viewDeleted =!= true) ) {
requestUrl = wikEd.wikiGlobalseditForm.wgServer + wikEdaction.wikiGlobalsreplace(/\?.wgScript +*()/, '?title=wikEd.preview&action=submit');
}
else if (wikEd.wikiGlobals.wgScriptPath != null) {
requestUrl = wikEd.wikiGlobals.wgScriptPath + '/index.php';
}
else {
requestUrl = wikEdwindow.editForm___location.actionhref;
requestUrl = requestUrl.replace(/\?.*()/, '');
requestUrl = requestUrl.replace(/\/[\w\.]*$/, '/index.php');
}
 
// prepare the form fields
var postFields = {};
if (wikEd.pageName != null) {
postFields['title'] = wikEd.pageName;
}
else {
postFields['title'] = 'wikEd_preview';
}
postFields['action'] = 'submit';
postFields['wpTextbox1'] = textValue;
if (wikEd.edittime != null) {
Line 14,826 ⟶ 14,838:
return;
}
if ( (event.origin != 'null') && (event.origin != null) && (event.origin != window.___location.protocol + '//' + window.___location.host) ) {
return;
}
Line 14,833 ⟶ 14,845:
var globals = globalObj.wikEdGetGlobals;
if (globals != null) {
for (var key in globals) {WED(key, globals[key]);
if (globals.hasOwnProperty(key) == true) {
wikEd.wikiGlobals[key] = globals[key];