Chrome extension to turn any tab into a minimal pop-up window (and vice versa)
Note
Moves the tab itself so the page is not reloaded and stays the way it is,
as oposed to something like window.open(location.href,"detab","toolbar=0");
Thus, also doesn't need permissions to read URLS, inject scripts, etc.
- Clone this repo or download the
7zfile from releases (https://github.com/MAZ01001/chrome_detab/releases) - Unpack
zip/7z(get 7-Zip from https://www.7-zip.org/) - Turn on dev-mode in chrome://extensions (top right)
- Click Load unpacked extension (top left)
- Locate unpacked folder
- Click it and then hit Select folder
- ...
- Profit
Important
This extension is NOT hosted in Chrome Web Store and since loading extension from other sources does not work (since chrome M33 ~ 2014) for security reasons, the only way you could/should install this extension is by following the steps above
click on the extension in chrome://extensions and scroll to options (and click it)
Note
The position origin for the custom window location is the top-left corner of the primary screen
When Same as source window/Same as source popup is chosen, it tries to center the window relative to the source window/popup
If size is set to auto, it's recommended to set location to auto as well (since centering wouldn't work and it'll align at the top-left corner of the source window/popup)
Note
Change extension hotkeys on chrome://extensions/shortcuts
Select multiple tabs by clicking on them while holding ctrl and/or shift
Move a tab inside a window with ctrl+shift+PgUp/ctrl+shift+PgDn (see Chrome keyboard shortcuts)
- Hotkeys
- alt+0
-
Toggle popup of last focused or selected tabs
- last focused tab gets moved to a popup window
- last focused popup gets moved to the last focused normal window (left of active tab in that window)
- all selected tabs are each moved to a popup window (in order) and the popup that was the active tab is focused
- alt+shift+0
-
Create new window with last focused or selected tabs
- last focused tab gets moved to a new window
- last focused popup gets moved to a new (non-popup) window
- all selected tabs are moved to a new window (same order) and are re-selected with the same active tab
- Clicking extension icon
-
Create popup of current and selected tabs (does nothing if somehow triggered from popup window)
- last focused tab gets moved to a popup window
- all selected tabs are each moved to a popup window (in order) and the popup that was the active tab is focused
- Context menu
Popup toggle current tab(on page)-
- current tab gets moved to a popup window
- current popup gets moved to the last focused normal window (left of active tab in that window)
Move to new normal window(on page)-
- current tab gets moved to a new window
- current popup gets moved to a new (non-popup) window
Popup link/Popup incognito link(on link elements)-
(does nothing if link URL is not available)
- create popup from link URL
- create inconito popup from link URL
Popup media (source URL)/Popup incognito media (source URL)(on image/video/audio elements)-
(does nothing if media source URL is not available)
- create popup from media source URL
- create inconito popup from media source URL
chrome.windows.getLastFocused()
gets the last focused window, but chrome.windows.QueryOptions
(parameter) can only distinguish between window types like normal and popup, and has no way of getting incognito/non-incognito windows separately
So, manual tracking of all focused windows is necessary
See LastWindow (static class) at the start of background.js