2022-12-19 01:20:14 +00:00
|
|
|
function postToastRoastEventDarkmode(t, url) {
|
|
|
|
const xhr = createXhrWithFormKey(url);
|
2023-03-10 03:21:02 +00:00
|
|
|
xhr[0].onload = function() {
|
2022-12-19 01:20:14 +00:00
|
|
|
postToastLoadEventDarkmode(xhr[0])
|
|
|
|
};
|
|
|
|
xhr[0].send(xhr[1]);
|
|
|
|
}
|
|
|
|
|
|
|
|
function postToastLoadEventDarkmode(xhr) {
|
|
|
|
let data
|
|
|
|
try {
|
|
|
|
data = JSON.parse(xhr.response)
|
|
|
|
}
|
|
|
|
catch (e) {
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
success = xhr.status >= 200 && xhr.status < 300;
|
|
|
|
showToast(success, getMessageFromJsonData(success, data));
|
2022-12-19 02:27:53 +00:00
|
|
|
location.reload();
|
2022-12-19 01:20:14 +00:00
|
|
|
}
|