Skip to content

Tiny browser extension which allows to open any links and images in a popup window, with many features and settings

License

Notifications You must be signed in to change notification settings

emvaized/open-in-popup-window-extension

Repository files navigation

Open in Popup Window

Mozilla Add-on Version Chrome Web Store Mozilla Add-on Chrome Web Store rating Chrome Web Store Created

This tiny and lightweight browser extension provides ability to quickly preview links without leaving the current page context. It adds entry in context menu of links, and when clicked, opens new small window at cursor position, with no tab bar and addressbar.

Features:

  • Ability to open images and search selected text in popup window
  • Use Shift + click to open in popup window (enabled by default)
  • Use drag and drop to open in popup window (disabled by default)
  • Configurable popup height, width and position on screen
  • Close popup window when origin window regains focus (excludes minimized and "always-on-top" windows)
  • Remember popup window size on manual resize (only Chrome – see Firefox bug report)
  • Open popup page in the main window on maximize (only Chrome – see Firefox bug report)
  • Automatically reopen new single tab windows and tabs opened by page as popup windows (more info)
  • Customizable keyboard hotkeys

This extension is intended to be used as an analogue of Safari Link Preview, Arc Peek or Zen Glance. It's a great way to preview links, which works everywhere and is not affected by the CORS problem like other extensions which are using iframe element for the link preview.

Get for Firefox   Get for Chrome

Screenshots

Options page

Support project ❤️

If you really enjoy this project, please consider supporting its further development by making a small donation using one of the options below!

Support on Ko-fi   Patreon   Donate using Liberapay   Donate Bitcoin

FAQ (Frequently Asked Questions)

How to close the popup using keyboard?

  • Alt + F4
  • Ctrl + W
  • Escape key (if enabled in the extension settings)

What keyboard hotkeys are available?

This extension implements the following keyboard hotkeys:

Action Description Default Hotkey
Open popup window in the main window Alt + Y
Open the currently opened page in a popup window Alt + P
Search selected text in a popup window
(or open empty search page if no selected text found)
Alt + S

You can change these hotkeys these ways:

  • In Chromium-based browsers (Chrome, Edge, Vivaldi, Brave etc), navigate to chrome://extensions/shortcuts and scroll down to Open in Popup Window category
  • In Firefox, navigate to about:addons, click cogwheel icon in top right corner and select "Manage Extension Shortcuts" (more details)

How to open page from the popup in the main window?

You can do it in 2 ways:

  • By right clicking on the page in popup window and selecting "Open page in main window"
  • Alt + Enter hotkey (if Esc hotkey is enabled in extension settings)
Demonstration

On Mac OS, popup windows do not appear in the fullscreen mode

Due to the specifics of fullscreen mode on Mac OS (fullscreen apps separate in their own Desktop space), popup windows do not appear above the fullcreen window. They either open on the "main" desktop (Firefox), or as a new fullscreen window (Chrome). To use this extension on Mac OS, you would have to open browser not in the fullscreen mode.

How to make popups remain always on top?

Unfortunately, browser extensions currently are not capable of manually setting the "always on top" flag.

But you can use third-party programs in your system which can do it, for example PowerToys on Windows. Don't forget to disable autoclosing popup window when it loses focus in the extension settings.

How to use the new feature "Reopen new single tab windows as popup windows"?

This powerful feature, introduced in version 0.3, allows to extend extension abilities and open any link anywhere as a popup window. With this option enabled, extension will be waiting in the background for any new windows to open, and once a new window with only one tab opens, it will reopen it as a popup.

This way it can operate with links, which it couldn't access otherwise, for example: sites on new tab page, in bookmarks panel, links on browser-protected pages (chrome://, about:) etc. You could create a popup window the following ways:

  • Using right click context menu and selecting "Open in new window"
  • Shift + left click in Firefox (+ Ctrl in Chrome) – this will essentially duplicate extension's "Open with shift+click" option
  • Shift + Enter in Firefox (+ Ctrl in Chrome) on any focused element, for example search suggestion in address bar

Popup windows opened this way could not be positioned by mouse cursor location, so an alternative "Fallback popup window location" setting will be used ("Center" by default)

How to use "Reopen tabs opened by page as popup windows"?

With this option enabled, new tabs opened by another tab (usually those opened by clicking links with target: _blank) will be automatically reopened as popup windows. This setting has an additional option to do it only for pinned tabs, which is enabled by default.

Private windows are not reopened as popups with this option enabled

You might need to manually allow this extension to run in private windows

How to reopen externally opened links as popup windows — similar to Little Arc feature from the Arc browser?

It is possible in Firefox by toggling the Reopen new single tab windows as popup windows feature and setting browser.link.open_newwindow.override.external config to 2 on about:config page

What features are browser-specific?

Features of this extension may vary depending on which browser are you using due to technical availability. On Firefox, you may get slightly more limited experience.

Chrome-specific features (also Edge, Opera, Vivaldi, Brave etc)

  • Option to remember popup window size on manual resize (improssible in Firefoxbug report)
  • Option to open page in the main window on clicking "Maximize" window button (improssible in Firefoxbug report)
  • Excluding "always on top" windows from "Close popup when normal window is focused" (may not work in Firefox)

Firefox-specific features

  • Escape key press during drag-and-drop cancels the "open in popup window" action (not availble in Chrome — #24 (comment))

Troubleshooting

  • ⚠️ If "Open by drag" and "Shift+click to open" options not working, or the popup window always gets positioned in the top left corner no matter the placement settings, please make sure you gave extension all permissions to run on every page you visit!
  • It was also previously reported that Firefox Multi-Account Containers might interfere with "Search in popup" action, enforcing it's own redirection and preventing popup window from opening. If you face such issues, I recommend using another search URL in the extension settings

Building

  • npm install to install all dependencies
  • npm run build to generate dist folder with minimized code of the extension

Ideas for future releases

  • Option to keep popup windows always on top (improssible in both Chrome and Firefoxbug report)
  • Option to open popup windows in incognito mode
  • Option to open current page in popup window on clicking the toolbar icon (instead of opening the settings popup)
  • Use text selection coordinates to align the "search" popup window when opened with keyboard shortcut
  • Option to translate selected text in popup window (along with keyboard hotkey)

Privacy

This extension doesn't collect any private data. It only requires access to currently open page in order to fetch information about the object under cursor when drag and drop event occured or context menu was opened.

About

Tiny browser extension which allows to open any links and images in a popup window, with many features and settings

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project