1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 16:18:07 +01:00
metamask-extension/app/scripts/lib/is-popup-or-notification.js

12 lines
457 B
JavaScript
Raw Normal View History

2016-11-11 19:26:12 +01:00
module.exports = function isPopupOrNotification () {
2016-08-17 01:46:44 +02:00
const url = window.location.href
// if (url.match(/popup.html$/) || url.match(/home.html$/)) {
// Below regexes needed for feature toggles (e.g. see line ~340 in ui/app/app.js)
// Revert below regexes to above commented out regexes before merge to master
if (url.match(/popup.html(?:\?.+)*$/) || url.match(/home.html(?:\?.+)*$/)) {
2016-08-17 01:46:44 +02:00
return 'popup'
} else {
return 'notification'
}
}