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() {
|
async function finishLoad() {
|
||||||
try {
|
try {
|
||||||
document.querySelector('.legacy-root')!.classList.remove('hidden')
|
document.querySelector('.legacy-root')?.classList.remove('hidden');
|
||||||
var loadingbk = document.getElementById('loading')
|
|
||||||
loadingbk!.classList.add('closeLoading')
|
|
||||||
await delay(501)
|
|
||||||
loadingbk!.remove()
|
|
||||||
} catch (err) {}
|
|
||||||
|
|
||||||
|
const loadingbk = document.getElementById('loading');
|
||||||
const result = browser.storage.local.get(['justupdated'])
|
loadingbk?.classList.add('closeLoading');
|
||||||
function open (result: any) {
|
await delay(501);
|
||||||
if (result.justupdated && !document.getElementById('whatsnewbk')) {
|
loadingbk?.remove();
|
||||||
OpenWhatsNewPopup()
|
} 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() {
|
async function DeleteWhatsNew() {
|
||||||
|
|||||||
Reference in New Issue
Block a user