Run prettier
parent
381dac72d4
commit
a0a0a591bc
|
|
@ -80,9 +80,7 @@ async function getSelectedTabIds(): Promise<number[]> {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (selectedTabs.length > 0 && selectedTabs[0].id) {
|
if (selectedTabs.length > 0 && selectedTabs[0].id) {
|
||||||
return selectedTabs
|
return selectedTabs.filter((tab) => tab.id).map((tab) => tab.id as number);
|
||||||
.filter(tab => tab.id)
|
|
||||||
.map(tab => tab.id as number)
|
|
||||||
}
|
}
|
||||||
throw new Error("No active tab.");
|
throw new Error("No active tab.");
|
||||||
}
|
}
|
||||||
|
|
@ -140,9 +138,11 @@ async function grabPost() {
|
||||||
|
|
||||||
// Remove ignored tags
|
// Remove ignored tags
|
||||||
// The complexity for this is quite bad but all the other ways I tried were even worse
|
// The complexity for this is quite bad but all the other ways I tried were even worse
|
||||||
vm.tags = vm.tags.filter(tag => cfg.value.tagIgnores.every(
|
vm.tags = vm.tags.filter((tag) =>
|
||||||
ignoredTag => tag.name != ignoredTag.names[0] // no getters after deserializing
|
cfg.value.tagIgnores.every(
|
||||||
));
|
(ignoredTag) => tag.name != ignoredTag.names[0], // no getters after deserializing
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
pop.posts.push(vm);
|
pop.posts.push(vm);
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,11 @@ async function upload() {
|
||||||
await ensurePostHasContentToken(szuru.value!, post, cfg);
|
await ensurePostHasContentToken(szuru.value!, post, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
const cmdData = new PostUploadCommandData(post, <SzuruSiteConfig>cloneDeep(selectedSite.value), cfg.value.sendUploadNotifications);
|
const cmdData = new PostUploadCommandData(
|
||||||
|
post,
|
||||||
|
<SzuruSiteConfig>cloneDeep(selectedSite.value),
|
||||||
|
cfg.value.sendUploadNotifications,
|
||||||
|
);
|
||||||
const cmd = new BrowserCommand("upload_post", cmdData);
|
const cmd = new BrowserCommand("upload_post", cmdData);
|
||||||
await browser.runtime.sendMessage(cmd);
|
await browser.runtime.sendMessage(cmd);
|
||||||
} catch (ex: any) {
|
} catch (ex: any) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue