mirror of
https://github.com/openvk/openvk
synced 2025-06-07 22:59:58 +03:00
feat(ajax): show loading cursor
This commit is contained in:
parent
6a882aeeb4
commit
cf09251a90
2 changed files with 9 additions and 1 deletions
|
@ -14,6 +14,10 @@ body {
|
|||
line-height: 1.19;
|
||||
}
|
||||
|
||||
body.ajax_request_made {
|
||||
cursor: progress;
|
||||
}
|
||||
|
||||
body, .ovk-fullscreen-dimmer, .ovk-photo-view-dimmer {
|
||||
scrollbar-gutter: stable both-edges;
|
||||
}
|
||||
|
|
|
@ -211,6 +211,8 @@ window.router = new class {
|
|||
history.replaceState({'from_router': 1}, '', url)
|
||||
}
|
||||
|
||||
u('body').addClass('ajax_request_made')
|
||||
|
||||
const parser = new DOMParser
|
||||
const next_page_request = await fetch(next_page_url, {
|
||||
method: 'AJAX',
|
||||
|
@ -228,6 +230,8 @@ window.router = new class {
|
|||
this.__closeMsgs()
|
||||
this.__unlinkObservers()
|
||||
|
||||
u('body').removeClass('ajax_request_made')
|
||||
|
||||
try {
|
||||
this.__appendPage(parsed_content)
|
||||
await this.__integratePage()
|
||||
|
|
Loading…
Reference in a new issue