Skip to content

fixed switch to the lastest tab when reverse switching#5

Open
lokeb wants to merge 1 commit into
theborg3of5:masterfrom
lokeb:master
Open

fixed switch to the lastest tab when reverse switching#5
lokeb wants to merge 1 commit into
theborg3of5:masterfrom
lokeb:master

Conversation

@lokeb

@lokeb lokeb commented Jul 4, 2024

Copy link
Copy Markdown

On ctrl+shift+tab to did not allow switching to the lastest tab in reverse order.

@theborg3of5 theborg3of5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! See my suggestions inside. :)

Comment thread service_worker.js
PinnedURL: "KeepOnePinnedTab_PinnedURL",
NoFocusPinnedTab: "KeepOnePinnedTab_NoFocusPinnedTab",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind including these whitespace changes, but they make it difficult to review your changes - please split them into a separate commit that does nothing else.

Comment thread service_worker.js
LegacyKey: "KeepOnePinnedTab_NewTabPage",
};

let lastTabId = -1

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally try to avoid global variables like this - is there some other way that we could detect that we're switching from the second tab to the first?

Comment thread service_worker.js
keepNeededTabs(tab.windowId);
});

chrome.tabs.onUpdated.addListener((tab) =>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a leftover from debugging - it should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants