mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Restricted page credentials polling to active tab
This commit is contained in:
parent
aec3aa2314
commit
7270acf8d9
2 changed files with 28 additions and 22 deletions
|
|
@ -1,3 +1,7 @@
|
|||
0.3.6 (20-10-2017)
|
||||
=========================
|
||||
- Restricted page credentials polling to active tab
|
||||
|
||||
0.3.5 (19-10-2017)
|
||||
=========================
|
||||
- Removed database locked/unlocked status polling and replaced it with message handling from KeePassXC signals
|
||||
|
|
|
|||
|
|
@ -1132,32 +1132,34 @@ cip.detectNewActiveFields = function() {
|
|||
// Switch credentials if database is changed or closed
|
||||
cip.detectDatabaseChange = function() {
|
||||
const dbDetectInterval = setInterval(function() {
|
||||
browser.runtime.sendMessage({
|
||||
action: 'check_databasehash'
|
||||
}).then((response) => {
|
||||
if (response.new === 'no-hash') {
|
||||
cipEvents.clearCredentials();
|
||||
if (document.visibilityState !== 'hidden') {
|
||||
browser.runtime.sendMessage({
|
||||
action: 'check_databasehash'
|
||||
}).then((response) => {
|
||||
if (response.new === 'no-hash') {
|
||||
cipEvents.clearCredentials();
|
||||
|
||||
browser.runtime.sendMessage({
|
||||
action: 'page_clear_logins'
|
||||
});
|
||||
|
||||
// Switch back to default popup
|
||||
browser.runtime.sendMessage({
|
||||
action: 'get_status'
|
||||
});
|
||||
} else {
|
||||
if (response.new !== 'no-hash' && response.new !== response.old) {
|
||||
browser.runtime.sendMessage({
|
||||
action: 'get_settings',
|
||||
}).then((response) => {
|
||||
cip.settings = response.data;
|
||||
cip.initCredentialFields(true);
|
||||
action: 'page_clear_logins'
|
||||
});
|
||||
|
||||
// Switch back to default popup
|
||||
browser.runtime.sendMessage({
|
||||
action: 'get_status'
|
||||
});
|
||||
} else {
|
||||
if (response.new !== 'no-hash' && response.new !== response.old) {
|
||||
browser.runtime.sendMessage({
|
||||
action: 'get_settings',
|
||||
}).then((response) => {
|
||||
cip.settings = response.data;
|
||||
cip.initCredentialFields(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
}, 2000);
|
||||
};
|
||||
|
||||
cip.initCredentialFields = function(forceCall) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue