diff options
author | Dan <danjm.com@gmail.com> | 2018-04-20 23:53:17 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-04-20 23:53:17 +0800 |
commit | 71b0de76ffdbdfc0ae696a009d5ee34971541e0b (patch) | |
tree | d0f2f4fd891a20eb7cbe5e7bfb82a375286fbc43 /app/scripts/lib/is-popup-or-notification.js | |
parent | 9f12c26d44a0d78f28af25056857b993f80bbd95 (diff) | |
parent | 00efcf9e8ba34d448b628c98d32ad12d5be2ffc9 (diff) | |
download | tangerine-wallet-browser-71b0de76ffdbdfc0ae696a009d5ee34971541e0b.tar.gz tangerine-wallet-browser-71b0de76ffdbdfc0ae696a009d5ee34971541e0b.tar.zst tangerine-wallet-browser-71b0de76ffdbdfc0ae696a009d5ee34971541e0b.zip |
Merge branch 'master' into dm-docs-2
Diffstat (limited to 'app/scripts/lib/is-popup-or-notification.js')
-rw-r--r-- | app/scripts/lib/is-popup-or-notification.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/app/scripts/lib/is-popup-or-notification.js b/app/scripts/lib/is-popup-or-notification.js deleted file mode 100644 index 894564def..000000000 --- a/app/scripts/lib/is-popup-or-notification.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Indicates whether the user is viewing the app through an extension like window or through a notification. - * Used to make some style decisions on the frontend, and when deciding whether to close the popup in the backend. - * - * @returns {string} Returns 'popup' if the user is viewing through the browser ('home.html') or popup extension - * ('popup.html'). Otherwise it returns 'notification'. - * - */ -module.exports = function isPopupOrNotification () { - const url = window.location.href - - if (url.match(/popup.html(?:\?.+)*$/) || - url.match(/home.html(?:\?.+)*$/) || url.match(/home.html(?:#.*)*$/)) { - return 'popup' - } else { - return 'notification' - } -} |