Skip to content

Commit

Permalink
Fix: listen for password input changes and update saved password
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamas Cseh committed Jan 9, 2021
1 parent dbc7e07 commit b73d44b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class RaceHandlerComponent implements OnInit {
}

constructor() {
console.log("RACE handler activated");
}

ngOnInit(): void {
Expand All @@ -35,6 +36,11 @@ export class RaceHandlerComponent implements OnInit {
input.value = savedPassword;
input.dispatchEvent(new Event('change'));
}

input.onchange = (value: any) => {
console.log(`Saving password ${input.value} to server ${selected}`);
localStorage.setItem(selected, input.value);
};
};
});
});
Expand Down
1 change: 1 addition & 0 deletions scripts/better-ui-debug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function debugMain(): void {
console.log("Better-UI running in debug mode");
function addScriptTag(src: string): void {
const script: HTMLScriptElement = document.createElement('script');
script.src = src;
Expand Down

0 comments on commit b73d44b

Please sign in to comment.