Skip to content

Instantly share code, notes, and snippets.

@nokimaro
Forked from donut/is_popup_window.js
Created December 18, 2016 01:58
Show Gist options
  • Save nokimaro/28fbe68b07255db5775d429ed4f2101f to your computer and use it in GitHub Desktop.
Save nokimaro/28fbe68b07255db5775d429ed4f2101f to your computer and use it in GitHub Desktop.
Is popup window
// Try to guess if the current window is a "popup"
window.isPopup =
window.isPopup || window.opener ||
(window.locationbar && window.locationbar.visible === false) ||
false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment