-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to last used tab #404
The head ref may contain hidden characters: "feature/switch-between-two\u2013last-used-tab"
Switch to last used tab #404
Conversation
app/manifest.json
Outdated
@@ -74,7 +74,8 @@ | |||
"49-showlatestdownload": {"description": "DOWNLOADS: Show latest download"}, | |||
"50-capturescreenshot": {"description": "UTILITY: Capture current viewport screenshot"}, | |||
"51-capturefullsizescreenshot": {"description": "UTILITY: Capture full size screenshot (max height is 16,348px due to browser limitation)"}, | |||
"52-forcecapturefullsizescreenshot": {"description": "UTILITY: Force capture full size screenshot (when window is not scrollable)"} | |||
"52-forcecapturefullsizescreenshot": {"description": "UTILITY: Force capture full size screenshot (when window is not scrollable)"}, | |||
"53-lastusedtab": {"description": "TABS: Switch to last used tab"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while, but IIRC these are sorted alphabetically in the settings screen, meaning if you change this to 05-lastusedtab
then it'll show up right after the ones for next and previous tab which is closer to where users would expect to find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it make a user's config loss if I sort command list? in chrome://extensions/shortcuts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've inserted this command after 14-lasttab
* Manage usedTabInfoQueue. | ||
*/ | ||
browser.tabs.onActivated.addListener(function (currentTab) { | ||
usedTabInfoQueue = [usedTabInfoQueue[1], currentTab] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Very tricky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 4592eed28eef5efb981d22bd8c49e542ba5913d6
takes switch window into consideration.
@@ -1,6 +1,7 @@ | |||
'use strict' | |||
|
|||
import captureScreenshot from './actions/captureScreenshot' | |||
import lastUsedTab from './actions/lastUsedTab' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great refactor, having these separate files for actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait a moment, it miss one situation. done.
/** | ||
* Convert base64 data to a blob and download | ||
*/ | ||
browser.tabs.executeScript({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a refactor. Since I didn't know window is accessible in background.js😅
I love it! Thank you so much! |
#320 😁