「利用者:Dragoniez/scripts/AN Reporter.js」の版間の差分

削除された内容 追加された内容
m v1.1 small bug fix
v1.2
2行目:
* Vandal Reporter (VR)
* Author: Dragoniez
* Version: 1.12 beta
*************************************/
//<nowiki>
358行目:
}
console.log('sectionsAPI: ' + sectionsAPI);
}
 
// If section is not found, show error
var sectionNum = sectionsAPI[sectionToEdit];
varif proceedToNext(sectionNum === undefined) { // If section is not found, show true;error
if (sectionNum === undefined) {
 
proceedToNext = false;
 
// Show the details of the error
389 ⟶ 385行目:
$dialog.dialog('option', 'width', width);
editDone($dialog);
 
}
} else { // If section is found, proceed
if (proceedToNext) { // If error occured above, don't run the code below
 
// Get the latest revision
481 ⟶ 476行目:
}
});
 
if (proceedToNext) } else { // If errorthe occuredpage above, dondoesn't run the code belowexist
 
$('.vr-editing').remove();
proceedToNext msgDone = false;
'<p>エラー: 編集先のページが存在しません</p>' +
// If section is not found, show error '<br>' +
'<p>ページ名:</p>' +
`<p>${pageToEdit}</p>` +
if (sectionNum === undefined) { '<br>' +
'<p>手動編集用:</p>' +
`<textarea disabled rows="5" style="width: 100%">${textToSubmit}</textarea>` +
'<br>' +
'<p>要約:</p>' +
`<textarea disabled rows="2" style="width: 100%">${editSummary.replace(scriptAd, '')}</textarea>`;
 
$dialog.append($(`<p>${msgDone}</p>`));
$dialog.dialog('option', 'width', width);
editDone($dialog);
 
}
 
} else { // If page info retrieval fails
781 ⟶ 797行目:
 
// Get edit summary
var textToShow = '+';
if (arrOfContribs.length === 0) {
// Do nothing
} else if (arrOfContribs.length === 1) {
textToShow = '+';
textToShow += arrOfContribs[0];
} else {
textToShow = '+';
textToShow += arrOfContribs.join(', ');
}