mirror of
https://github.com/openvk/openvk
synced 2024-11-14 11:09:12 +03:00
11 lines
452 B
JavaScript
Executable file
11 lines
452 B
JavaScript
Executable file
// This file is included only when there is no info about timezone in users's chandler session
|
|
|
|
xhr = new XMLHttpRequest();
|
|
xhr.open("POST", "/iapi/timezone", true);
|
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
|
xhr.onload = (response) => {
|
|
if(JSON.parse(response.originalTarget.responseText).success == 1) {
|
|
window.location.reload();
|
|
}
|
|
};
|
|
xhr.send('timezone=' + new Date().getTimezoneOffset());
|