big restructure
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
const refreshFsLightbox = () => {
|
||||
if (typeof window.requestFsLightboxRefresh === 'function') {
|
||||
return window.requestFsLightboxRefresh();
|
||||
}
|
||||
if (typeof window.refreshFsLightbox === 'function') {
|
||||
window.refreshFsLightbox();
|
||||
window.__fsLightboxRefreshPending = false;
|
||||
return true;
|
||||
}
|
||||
window.__fsLightboxRefreshPending = true;
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -46,3 +51,7 @@ if (document.readyState === 'loading') {
|
||||
refreshFsLightbox();
|
||||
initObserver();
|
||||
}
|
||||
|
||||
if (window.__fsLightboxRefreshPending && typeof window.refreshFsLightbox === 'function') {
|
||||
refreshFsLightbox();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user