Skip to content

This tiny browser extension allows to open any links and images in a popup window

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 Mozilla Add-on Stars

This tiny 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 drag and drop to open in popup window (disabled by default)
  • Use Shift + Click to open in popup window (disabled by default)
  • Configurable popup height, width and position on screen
  • Option to close popup window when origin window regains focus
  • New popups can be opened from existing popups
  • Automatically reopen new single tab windows as popup windows

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

Get for Firefox   Get for Chrome

Screenshots

Support

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

Support on Ko-fi   Donate using Liberapay   Donate Bitcoin

FAQ

How to close the popup using keyboard?

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

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

You can do it in 2 ways:

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

In fullscreen mode on Mac OS popup windows do not appear

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 "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)

If private windows are not reopened as popup with this option enabled

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

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 open. If you have a setup like this, I belive there is no easy fix other than choosing another search URL in Open in Popup Window settings

Building

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

Plans for future

  • 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)

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.