mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 23:59:59 +02:00
Refactor ZenGlanceManager.mjs to simplify closing of glance and handle quitting application
This commit is contained in:
parent
9b4b399c59
commit
0e8a452071
2 changed files with 2 additions and 1 deletions
|
@ -189,6 +189,7 @@
|
||||||
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
||||||
|
|
||||||
gBrowser.tabContainer._invalidateCachedTabs();
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
|
this.lastCurrentTab.closing = true;
|
||||||
gBrowser.removeTab(this.lastCurrentTab, { animate: false });
|
gBrowser.removeTab(this.lastCurrentTab, { animate: false });
|
||||||
|
|
||||||
this.#currentTab = null;
|
this.#currentTab = null;
|
||||||
|
|
|
@ -288,7 +288,7 @@
|
||||||
|
|
||||||
async addCustomColor() {
|
async addCustomColor() {
|
||||||
const color = this.customColorInput.value;
|
const color = this.customColorInput.value;
|
||||||
if (!color) {
|
if (!color || !color.match(/^#[0-9a-f]{3,6}$/i)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// can be any color format, we just add it to the list as a dot, but hidden
|
// can be any color format, we just add it to the list as a dot, but hidden
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue