1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-28 12:16:22 -07:00

Fix edit post not letting non-privileged users edit their posts

This commit is contained in:
Eggbertx 2023-02-11 15:33:15 -08:00
parent 0ec36c2840
commit 46db3e0abc
3 changed files with 10 additions and 6 deletions

View file

@ -12,18 +12,20 @@ const idRe = /^((reply)|(op))(\d+)/;
function editPost(id, _board) {
let cookiePass = getCookie("password");
promptLightbox(cookiePass, true, () => {
promptLightbox(cookiePass, true, (_jq, inputData) => {
$("input[type=checkbox]").prop("checked", false);
$(`input#check${id}`).prop("checked", true);
$("input#delete-password").val(inputData);
$("input[name=edit_btn]").trigger("click");
}, "Edit post");
}
function moveThread(id, _board) {
let cookiePass = getCookie("password");
promptLightbox(cookiePass, true, () => {
promptLightbox(cookiePass, true, (_jq, inputData) => {
$("input[type=checkbox]").prop("checked", false);
$(`input#check${id}`).prop("checked", true);
$("input#delete-password").val(inputData);
$("input[name=move_btn]").trigger("click");
}, "Move thread");
}