From 8fb1237d6425655b88d0bca6ef000d7b77939617 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 12 Apr 2018 13:17:46 -0230 Subject: Documentation for environemnt-type.js --- app/scripts/lib/environment-type.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/scripts') 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$/)) { -- cgit