This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
125d6e5
commit 892f412
Showing
6 changed files
with
88 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
function getCredentials(callback) | ||
{ | ||
if (navigator.credentials) | ||
{ | ||
navigator.credentials.get({password: true, federated: {providers: [ 'https://accounts.google.com' ]}, mediation: "silent"}).then(function(credential) | ||
{ | ||
console.log("credential management api get", credential); | ||
if (callback) callback(credential); | ||
|
||
}).catch(function(err){ | ||
console.error ("credential management api get error", err); | ||
if (callback) callback(); | ||
}); | ||
} | ||
else { | ||
if (callback) callback(); | ||
} | ||
} | ||
|
||
function setCredentials(creds) | ||
{ | ||
if (navigator.credentials) | ||
{ | ||
navigator.credentials.create({password: creds}).then(function(credential) | ||
{ | ||
navigator.credentials.store(credential).then(function() | ||
{ | ||
console.log("credential management api put", credential); | ||
|
||
}).catch(function (err) { | ||
console.error("credential management api put error", err); | ||
}); | ||
|
||
}).catch(function (err) { | ||
console.error("credential management api put error", err); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!doctype html> | ||
<html class="no-js" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>Settings</title> | ||
<link rel="shortcut icon" href="icon.png" type="image/gif" /> | ||
|
||
<script src="inverse/chrome.js"></script> | ||
<script src="js/jquery.min.js"></script> | ||
<script src="js/libs.bundle.js"></script> | ||
<script src="js/strophe.vcard.js"></script> | ||
<script src="js/moment.js"></script> | ||
<script src="js/sip.js"></script> | ||
<script src="js/etherlynk.js"></script> | ||
<script src="js/background.js"></script> | ||
<script src="credentials.js"></script> | ||
|
||
</head> | ||
<body> | ||
<iframe src="options/index.html" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden;"></iframe> | ||
</body> | ||
</html> |