MediaWiki:DRN-wizard.js: Difference between revisions

Content deleted Content added
Undid revision 560935160 by Soap (talk); did not work, apparently
Thehelpfulone (talk | contribs)
sync with User:Steven Zhang/testcode.js
Line 33:
 
$("#drwContent1").append("<h3>Location of dispute</h3>");
$("#drwContent1").append("<p>What is the ___location of this dispute? If there are multiple forums, separatelist themthe withmain commasone and describe the others in the dispute description.</p>");
 
var inputbox = $( document.createElement('input') );
Line 166:
this.getWikitextReport = function() {
//Returns string of wikitext for submission to DR page
var report = "{{DR case status}}\n{{drn filing editor|{{subst:" + "REVISIONUSER}}|~~" + "~~" + "~}}\n{{subst:" + "DNAU|14}}<!-- PLEASE REMOVE THE PREVIOUS COMMENT WHEN CLOSING THIS THREAD. (Otherwise the thread won't be archived until the date shown.) -->\n\n";
//Timestamp
var report = "{{<includeonly>safesubst:</includeonly>#time:d F Y}}";
//On Talk Page
report += "<span style=\"font-size:110%\">'''Have you discussed this on a talk page?'''</span>\n";
Line 410 ⟶ 413:
//Set the post-page on the DRW object
gDRW.post_link = DRPage + "#/" + gDRW.article_title.replace(' ', '_');
 
//Compose Report
Line 422 ⟶ 425:
var summary = gDRW.article_title;
addNewSectionaddNewSubPage( DRPage, summary, report, edittoken );
}
Line 454 ⟶ 457:
* Taken almost verbatim from http://www.mediawiki.org/wiki/API:Edit
*/
function addNewSectionaddNewSubPage( pagetitle, summary, content, editToken ) {
$.ajax({
url: mw.util.wikiScript( 'api' ),
Line 460 ⟶ 463:
format: 'json',
action: 'edit',
title: pagetitle + '/' + summary,
section: 'new',
summary: summary,
text: content,