forked from MarseyWorld/MarseyWorld
27 lines
741 B
JavaScript
27 lines
741 B
JavaScript
function approve_emoji(t, name) {
|
|
postToast(t, `/admin/approve/emoji/${name}`,
|
|
{
|
|
"comment": document.getElementById(`${name}-comment`).value,
|
|
"tags": document.getElementById(`${name}-tags`).value,
|
|
"name": document.getElementById(`${name}-name`).value,
|
|
"kind": document.getElementById(`${name}-kind`).value,
|
|
"author": document.getElementById(`${name}-author`).value,
|
|
"nsfw": document.getElementById(`${name}-nsfw`).checked,
|
|
},
|
|
() => {
|
|
document.getElementById(`${name}-emoji`).remove()
|
|
}
|
|
);
|
|
}
|
|
|
|
function remove_emoji(t, name) {
|
|
postToast(t, `/remove/emoji/${name}`,
|
|
{
|
|
"comment": document.getElementById(`${name}-comment`).value,
|
|
},
|
|
() => {
|
|
document.getElementById(`${name}-emoji`).remove()
|
|
}
|
|
);
|
|
}
|