mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 14:39:58 +02:00
Refactor keyboard shortcuts and tab unloader logic
This commit is contained in:
parent
f7135c0f4a
commit
d2296c0523
2 changed files with 4 additions and 4 deletions
|
@ -854,7 +854,7 @@ var gZenKeyboardShortcutsManager = {
|
||||||
if (key.getAttribute('internal') == 'true') {
|
if (key.getAttribute('internal') == 'true') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
key.remove();
|
key.setAttribute('disabled', 'true');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
intervalListener() {
|
intervalListener() {
|
||||||
|
if (!lazy.zenTabUnloaderEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const currentTimestamp = Date.now();
|
const currentTimestamp = Date.now();
|
||||||
const excludedUrls = this.excludedUrls;
|
const excludedUrls = this.excludedUrls;
|
||||||
for (const tab of this.unloader.tabs) {
|
for (const tab of this.unloader.tabs) {
|
||||||
|
@ -172,9 +175,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTabOpen(tab) {
|
handleTabOpen(tab) {
|
||||||
if (!lazy.zenTabUnloaderEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.updateTabActivity(tab);
|
this.updateTabActivity(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue