mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
add new autofill on page load features
This commit is contained in:
committed by
Thomas Rittson
parent
384b352a97
commit
396870e507
@@ -245,12 +245,16 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
if (fromCommand) {
|
||||
cipher = await this.cipherService.getNextCipherForUrl(tab.url);
|
||||
} else {
|
||||
const lastLaunchedCipher = await this.cipherService.getLastLaunchedForUrl(tab.url);
|
||||
const lastLaunchedCipher = await this.cipherService.getLastLaunchedForUrl(tab.url, true);
|
||||
if (lastLaunchedCipher && Date.now().valueOf() - lastLaunchedCipher.localData?.lastLaunched?.valueOf() < 30000) {
|
||||
cipher = lastLaunchedCipher;
|
||||
}
|
||||
else {
|
||||
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
||||
cipher = await this.cipherService.getLastUsedForUrl(tab.url, true);
|
||||
}
|
||||
|
||||
if (cipher === null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user