2022-12-29 14:20:27 +00:00
|
|
|
function equip_hat(t, hat_id, hat_name) {
|
|
|
|
const profile_pic_hat = document.getElementById("profile-pic-35-hat");
|
|
|
|
function extra_actions(xhr) {
|
|
|
|
if(xhr.status == 200) {
|
2023-03-21 13:58:14 +00:00
|
|
|
profile_pic_hat.src = `/i/hats/${hat_name}.webp?x=1`
|
2022-12-29 14:20:27 +00:00
|
|
|
profile_pic_hat.classList.remove('d-none')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
postToastSwitch(t, `/equip_hat/${hat_id}`, `equip-${hat_id}`, `unequip-${hat_id}`, `d-none`, extra_actions)
|
|
|
|
}
|