User:Terasail/Edit Request Tool.js: Difference between revisions

Content deleted Content added
Fix error caused by section detection
Fix regex miss
Line 48:
summary: editSummary
}).done(function(result) {
let encodePageName = encodeURIComponent(pageName);
window.___location = "/w/index.php?title=" + pageNameencodePageName + "&type=revision&diff=cur&oldid=prev";
});
}
Line 117 ⟶ 118:
}
wikitext = wikitext.slice(secIndx.byteoffset, endIndx.byteoffset);
wikitext = wikitext.replace(/{{ *([SETFI]PER|Edit([ -]?[A-Z]+[ -]?| )Protected)\s*[^}}]*/i, editTemplate);
let editSummary = "/* " + header.replaceAll("_", " ") + " */ " + replyOption[2] + " ([[User:Terasail/Edit_Request_Tool|Edit Request Tool]])";
if (replyOption[1] != "Close") {
Line 283 ⟶ 284:
let fieldsetT = new OO.ui.FieldsetLayout();
// Add an horizontal field layout
fieldsetT.addItems( [ new OO.ui.FieldLayout( new OO.ui.Widget( { content: [hzLayoutT] } ) ) ] );
new OO.ui.FieldLayout(
new OO.ui.Widget( {
content: [hzLayoutT]
} )
)
] );
$(firstRow).append(fieldsetT.$element);
//Close request