From a4f21d6ab5c9672c335f0c593a3b49d317ebc153 Mon Sep 17 00:00:00 2001 From: Neeraj P Yetheendran <46917698+NXPY123@users.noreply.github.com> Date: Sat, 8 Oct 2022 13:13:57 +0530 Subject: [PATCH 01/17] Display Login Page on StartUp for first time users 1/2 (#185) * Added checklog script * checklog to check if user logged in checklog script checks if user has already logged in before to show log in page on start * Redirect to popup after user enters login info --- src/js/checklog.js | 7 +++++++ src/js/popup.html | 5 +++-- src/pages/login/app.js | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/js/checklog.js diff --git a/src/js/checklog.js b/src/js/checklog.js new file mode 100644 index 0000000..57aa9d8 --- /dev/null +++ b/src/js/checklog.js @@ -0,0 +1,7 @@ +chrome.storage.local.get(["AutoJoomerUsername"], function (result) { //checks if user has logged in to show login page on opening popup + if (!result.AutoJoomerUsername) { + window.open("/src/pages/login/login.html", "_self"); + } else { + + } + }); diff --git a/src/js/popup.html b/src/js/popup.html index 9705b07..4faa2ff 100644 --- a/src/js/popup.html +++ b/src/js/popup.html @@ -11,7 +11,8 @@ - + +