diff options
Merge branch 'master' of github.com:MetaMask/metamask-plugin into library
Diffstat (limited to 'app/scripts/lib/is-popup-or-notification.js')
-rw-r--r-- | app/scripts/lib/is-popup-or-notification.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/scripts/lib/is-popup-or-notification.js b/app/scripts/lib/is-popup-or-notification.js new file mode 100644 index 000000000..5c38ac823 --- /dev/null +++ b/app/scripts/lib/is-popup-or-notification.js @@ -0,0 +1,8 @@ +module.exports = function isPopupOrNotification() { + const url = window.location.href + if (url.match(/popup.html$/)) { + return 'popup' + } else { + return 'notification' + } +} |