mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 23:39:59 +02:00
Refactor ZenGlanceManager.mjs to prevent opening multiple glances
This commit is contained in:
parent
16fc60e1f0
commit
5eb4fb0d0d
1 changed files with 4 additions and 3 deletions
|
@ -86,6 +86,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
openGlance(data) {
|
openGlance(data) {
|
||||||
|
if (this.#currentBrowser) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const initialX = data.x;
|
const initialX = data.x;
|
||||||
const initialY = data.y;
|
const initialY = data.y;
|
||||||
const initialWidth = data.width;
|
const initialWidth = data.width;
|
||||||
|
@ -97,9 +101,6 @@
|
||||||
this.browserWrapper.removeAttribute("animate-full-end");
|
this.browserWrapper.removeAttribute("animate-full-end");
|
||||||
|
|
||||||
const url = data.url;
|
const url = data.url;
|
||||||
if (this.#currentBrowser) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const currentTab = gBrowser.selectedTab;
|
const currentTab = gBrowser.selectedTab;
|
||||||
const overlayWrapper = document.getElementById("tabbrowser-tabbox");
|
const overlayWrapper = document.getElementById("tabbrowser-tabbox");
|
||||||
overlayWrapper.prepend(this.overlay);
|
overlayWrapper.prepend(this.overlay);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue