Skip to content

Commit

Permalink
Test console
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 18, 2024
1 parent 905c55d commit 3ab8b9b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions holo-key-manager-extension/scripts/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ const createOrUpdateWindow = (
windowProperties: WindowProperties,
handleWindowUpdateOrCreate: () => Promise<void>
) => {
console.log(2);
const onWindowCreated = (newWindow: chrome.windows.Window | undefined) => {
console.log(3);
console.log(newWindow);
if (!newWindow) return;
windowId = newWindow.id;
chrome.windows.onRemoved.addListener((id) => {
Expand All @@ -72,8 +73,6 @@ const createOrUpdateWindow = (
handleWindowUpdateOrCreate();
};

console.log(windowId);

if (windowId) {
chrome.windows.remove(windowId, () => {
windowId = undefined;
Expand Down Expand Up @@ -141,7 +140,6 @@ const processMessageWebApp = async (
) => {
try {
if (!(await isSetupComplete())) {
console.log('1');
return updateOrCreateWindow(NEEDS_SETUP, sendResponseWithSender);
}
switch (parsedMessage.action) {
Expand Down

0 comments on commit 3ab8b9b

Please sign in to comment.