1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

finish autofill from view, other misc cleanup (#1368)

* finish autofill from view, other misc cleanup

* compare hostnames for authResult
This commit is contained in:
Kyle Spearrin
2020-08-24 10:17:15 -04:00
committed by GitHub
parent d4d5ccc4a4
commit b7c2c76230
12 changed files with 150 additions and 140 deletions

View File

@@ -1,13 +1,13 @@
window.addEventListener("message", function(event) {
if (event.source != window)
window.addEventListener('message', (event) => {
if (event.source !== window)
return;
if (event.data.command && (event.data.command == "authResult")) {
if (event.data.command && (event.data.command === 'authResult')) {
chrome.runtime.sendMessage({
command: event.data.command,
code: event.data.code,
state: event.data.state,
referrer: event.source.location.hostname
referrer: event.source.location.hostname,
});
}
}, false)
}, false)