Skip to content

Commit 4e3339a

Browse files
removed inject on update
1 parent 36c2457 commit 4e3339a

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.DS_Store

0 Bytes
Binary file not shown.

src/background/background.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isBrowserURL, isFirefox } from "../common/common";
1+
import { isBrowserURL } from "../common/common";
22
import {
33
Commands,
44
Message,
@@ -19,21 +19,15 @@ import browser from "webextension-polyfill";
1919

2020
browser.runtime.onInstalled.addListener(async ({ reason }) => {
2121
// should this be async?
22-
// should I do this on update?
23-
if (reason === "install" || reason === "update") {
24-
// uninstall survey
25-
// injectig on update might clash with already installed content script.
26-
// inject extension
27-
// open the welcome page
22+
if (reason === "install") {
2823
// opening the welcome page first buys the extension time to inject into the avalible pages
29-
if (reason === "install") {
30-
browser.runtime.setUninstallURL("https://forms.gle/Eqi9Hgs86hSVrvT57");
31-
const isMissingCommands = await checkCommands();
32-
const welcomeUrl = new URL("https://tabbutler.netlify.app/welcome");
33-
if (isMissingCommands) {
34-
// if there are missing/unbound commands, set a query param to show on the welcome page
35-
welcomeUrl.searchParams.set("missing_commands", "true");
36-
}
24+
// uninstall survey
25+
browser.runtime.setUninstallURL("https://forms.gle/Eqi9Hgs86hSVrvT57");
26+
const isMissingCommands = await checkCommands();
27+
const welcomeUrl = new URL("https://tabbutler.netlify.app/welcome");
28+
if (isMissingCommands) {
29+
// if there are missing/unbound commands, set a query param to show on the welcome page
30+
welcomeUrl.searchParams.set("missing_commands", "true");
3731
await browser.tabs.create({ url: welcomeUrl.toString() }); // not really nessecary to await
3832
}
3933
await injectExtension(); // not nessecary to await

src/content/components/ListItems/ListItem.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ export const ListItem = styled.div<{ selected: boolean }>`
1313
width: 100%;
1414
1515
height: 50px;
16+
/* using a set height might not be needed */
1617
display: flex;
1718
flex-direction: row;
1819
/* which one? */
1920
row-gap: 16px;
2021
column-gap: 16px;
2122
align-items: center;
2223
padding: 8px;
24+
/* if no height is set, use 10px */
2325
border-radius: 10px;
2426
/* justify-content: space-between; */
2527
cursor: pointer;

0 commit comments

Comments
 (0)