- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathauth.js
More file actions
Latest commit
20 lines (17 loc) · 573 Bytes
/
Copy pathauth.js
File metadata and controls
20 lines (17 loc) · 573 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
consturl=newURL(window.location.href);
consttoken=url.searchParams.get("token");
constemail=url.searchParams.get("email");
asyncfunctiondisplayAuthenticated(){
consttitle=document.getElementById("title");
console.log(token);
if(token){
chrome.storage.local.set({"token": token,"email" :email},function(){
consttitle=document.getElementById("title");
title.textContent="Authentication Done";
});
}
else{
title.textContent="Authentication failed";
}
}
displayAuthenticated();