Skip to content

Commit

Permalink
Add helper to login when typing User Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
bigreddmachine committed Sep 22, 2016
1 parent f2e057e commit f986510
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ <h1 class="center">Please Login</h1>
<form id="user-agent-form" method="post" class="form">
<input type="text" id="user-agent" placeholder="Please enter your wallet User Agent.">
<button type="submit">Unlock</button>
<button type="button" id="login-whats-this">What's This?</a>
</form>

<div class="errormsg" id="user-agent-error">
There was an error logging in. Please check your password and try again.
</div>
Expand Down
4 changes: 4 additions & 0 deletions lib/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ document.addEventListener('DOMContentLoaded', function () {
}
});

document.getElementById("login-whats-this").addEventListener("click", function () {
chrome.tabs.create({url: '/data/html/start.html'});
});

// Login with valid User Agent
document.getElementById('user-agent-form').addEventListener('submit', function (e) {
e.preventDefault();
Expand Down

0 comments on commit f986510

Please sign in to comment.