diff options
author | Dan <danjm.com@gmail.com> | 2018-04-12 23:47:46 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-04-12 23:47:46 +0800 |
commit | 8fb1237d6425655b88d0bca6ef000d7b77939617 (patch) | |
tree | 28884a5c19511a41f4eff792297ac35d266aab5b /app/scripts/lib | |
parent | 29dab1e9e00c1c1e6ad834026df51b2839d3171d (diff) | |
download | tangerine-wallet-browser-8fb1237d6425655b88d0bca6ef000d7b77939617.tar.gz tangerine-wallet-browser-8fb1237d6425655b88d0bca6ef000d7b77939617.tar.zst tangerine-wallet-browser-8fb1237d6425655b88d0bca6ef000d7b77939617.zip |
Documentation for environemnt-type.js
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/environment-type.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/scripts/lib/environment-type.js b/app/scripts/lib/environment-type.js index 7966926eb..f13a1574d 100644 --- a/app/scripts/lib/environment-type.js +++ b/app/scripts/lib/environment-type.js @@ -1,3 +1,12 @@ +/** + * Used to determine the window type through which the app is being viewed. + * - 'popup' refers to the extension opened through the browser app icon (in top right corner in chrome and firefox) + * - 'responsive' refers to the main browser window + * - 'notification' refers to the popup that appears in its own window when taking action outside of metamask + * + * @returns {string} A single word label that represents the type of window through which the app is being viewed + * + */ module.exports = function environmentType () { const url = window.location.href if (url.match(/popup.html$/)) { |