aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/is-popup-or-notification.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-04-19 02:45:48 +0800
committerDan <danjm.com@gmail.com>2018-04-19 02:45:48 +0800
commit649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9 (patch)
treebc1e935331aa3678d18c2ffbcc04e791a711c0aa /app/scripts/lib/is-popup-or-notification.js
parente80bd230b9bb6ac9ff05d7095f74dd2fd7ebb3af (diff)
parent7e21fc2aa780ccb4ffb2f642156385db22c47a52 (diff)
downloadtangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar.gz
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar.bz2
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar.lz
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar.xz
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.tar.zst
tangerine-wallet-browser-649d2f8b229a6a749c0129dd5ef6dcf5b870e6c9.zip
Merge branch 'master' into dm-docs-1
Diffstat (limited to 'app/scripts/lib/is-popup-or-notification.js')
-rw-r--r--app/scripts/lib/is-popup-or-notification.js18
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'
- }
-}