MarseyWorld/files/assets/js/submit_emojis.js

27 lines
741 B
JavaScript
Raw Normal View History

2023-03-18 14:59:11 +00:00
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,
2024-02-16 17:02:43 +00:00
"author": document.getElementById(`${name}-author`).value,
2023-10-05 10:19:50 +00:00
"nsfw": document.getElementById(`${name}-nsfw`).checked,
},
() => {
2023-03-18 14:57:45 +00:00
document.getElementById(`${name}-emoji`).remove()
}
);
}
2023-03-18 14:53:00 +00:00
function remove_emoji(t, name) {
postToast(t, `/remove/emoji/${name}`,
{
"comment": document.getElementById(`${name}-comment`).value,
},
() => {
2023-03-18 14:57:45 +00:00
document.getElementById(`${name}-emoji`).remove()
}
);
}