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 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 (disabled by default)
  • Use drag and drop 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 (more info)
  • Automatically reopen tabs opened from page as popup windows
  • 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

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

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

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

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.

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