User:Technical 13/Scripts/OrphanStatus.js: Difference between revisions

Content deleted Content added
Technical 13 (talk | contribs)
Okay, text to post back to the page looks good (had an extra line feed to chop out here... Will figure out why it's not actually posting in a minute.
Technical 13 (talk | contribs)
ahh, forgot to put it in the log... Still need to figure out why it's not actually posting...
Line 14:
var deOrphanerContent = $(deOrphanerResponse).find('rev').text();
var deOrphanerSubmit = {
action: "edit",
titles: mw.config.get( 'wgPageName' ),
text: deOrphanerContent.replace(/\{\{Orphan(.*?)\}\}\n/gi, ""),
Line 20:
token: mw.user.tokens.get( 'editToken' )
};
console.log("Replacement wikitext: \n%O", deOrphanerContent.replace(/\{\{Orphan(.*?)\}\}/gi, ""));
$.when(
$.post(mw.config.get( 'wgScriptPath' )+"/api.php", deOrphanerSubmit, function(deOrphanerSesponse){
$(".loadinganimation").html("Article deOrphanin in progress...");
});
).done(function() {
$(".loadinganimation").html("Article deOrphaned!");
});