mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Timezone: Fix funny case when page is always reloading in some places
This commit is contained in:
parent
bf19fb2ab7
commit
72e0103021
1 changed files with 5 additions and 1 deletions
|
@ -3,5 +3,9 @@
|
|||
xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "/iapi/timezone", true);
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
xhr.onload = () => {window.location.reload()};
|
||||
xhr.onload = () => {
|
||||
if(JSON.parse(response.originalTarget.responseText).response == 1) {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
xhr.send('timezone=' + new Date().getTimezoneOffset());
|
||||
|
|
Loading…
Reference in a new issue