aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/is-popup-or-notification.js
blob: ad3e825c050390fabadc55338ebfd770b1d10109 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
module.exports = function isPopupOrNotification () {
  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(?:\?.+)*$/) || url.match(/home.html(?:#.*)*$/)) {
    return 'popup'
  } else {
    return 'notification'
  }
}