「利用者:Dragoniez/scripts/AN Reporter.js」の版間の差分
削除された内容 追加された内容
m v1.1 small bug fix |
v1.2 |
||
2行目:
* Vandal Reporter (VR)
* Author: Dragoniez
* Version: 1.
*************************************/
//<nowiki>
358行目:
}
console.log('sectionsAPI: ' + sectionsAPI);
// If section is not found, show error▼
var sectionNum = sectionsAPI[sectionToEdit];
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行目:
}
});
$('.vr-editing').remove();
'<p>エラー: 編集先のページが存在しません</p>' +
'<p>ページ名:</p>' +
`<p>${pageToEdit}</p>` +
'<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(', ');
}
|