mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
clean up finishload function
This commit is contained in:
+16
-13
@@ -304,21 +304,24 @@ export function OpenWhatsNewPopup() {
|
||||
|
||||
async function finishLoad() {
|
||||
try {
|
||||
document.querySelector('.legacy-root')!.classList.remove('hidden')
|
||||
var loadingbk = document.getElementById('loading')
|
||||
loadingbk!.classList.add('closeLoading')
|
||||
await delay(501)
|
||||
loadingbk!.remove()
|
||||
} catch (err) {}
|
||||
document.querySelector('.legacy-root')?.classList.remove('hidden');
|
||||
|
||||
|
||||
const result = browser.storage.local.get(['justupdated'])
|
||||
function open (result: any) {
|
||||
if (result.justupdated && !document.getElementById('whatsnewbk')) {
|
||||
OpenWhatsNewPopup()
|
||||
}
|
||||
const loadingbk = document.getElementById('loading');
|
||||
loadingbk?.classList.add('closeLoading');
|
||||
await delay(501);
|
||||
loadingbk?.remove();
|
||||
} catch (err) {
|
||||
console.error("Error during loading cleanup:", err);
|
||||
}
|
||||
|
||||
try {
|
||||
const { justupdated } = await browser.storage.local.get('justupdated');
|
||||
if (justupdated && !document.getElementById('whatsnewbk')) {
|
||||
OpenWhatsNewPopup();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error retrieving 'justupdated' from storage:", error);
|
||||
}
|
||||
result.then(open, onError)
|
||||
}
|
||||
|
||||
async function DeleteWhatsNew() {
|
||||
|
||||
Reference in New Issue
Block a user