-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major update to UI to mirror the web client, and created options page…
… to automatically link created links to the set passphrase
- Loading branch information
Aditya Dedhia
committed
May 12, 2023
1 parent
5b9bcba
commit 0ddcdaa
Showing
8 changed files
with
143 additions
and
189 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
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<body> | ||
<h1>pli.sh options</h1> | ||
<hr/> | ||
<br/> | ||
<form id="options-form"> | ||
<label for="passphrase">Your passphrase (you can change this as frequently as you like, passphrases are not linked to your identity)</label><br> | ||
<input type="text" id="passphrase" name="passphrase"><br> | ||
<input type="submit" value="Save"> | ||
</form> | ||
|
||
<script src="options.js"></script> | ||
</body> | ||
|
||
</html> |
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,16 @@ | ||
document.addEventListener('DOMContentLoaded', restoreOptions); | ||
|
||
document.querySelector('#options-form').addEventListener('submit', saveOptions); | ||
|
||
function saveOptions(e) { | ||
e.preventDefault(); | ||
chrome.storage.local.set({ | ||
passphrase: document.querySelector('#passphrase').value | ||
}); | ||
} | ||
|
||
function restoreOptions() { | ||
chrome.storage.local.get('passphrase', (data) => { | ||
document.querySelector('#passphrase').value = data.passphrase || ''; | ||
}); | ||
} |
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
Oops, something went wrong.