mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Misc formatting
This commit is contained in:
@@ -97,9 +97,9 @@ export default class PopupReceiverSelector
|
|||||||
this.defaultMediaType = defaultMediaType;
|
this.defaultMediaType = defaultMediaType;
|
||||||
this.availableMediaTypes = availableMediaTypes;
|
this.availableMediaTypes = availableMediaTypes;
|
||||||
|
|
||||||
// Current window to base centered position on
|
// Calculate centered size/position based on current window
|
||||||
const openerWindow = await browser.windows.getCurrent();
|
const centeredProps = getWindowCenteredProps(
|
||||||
const centeredProps = getWindowCenteredProps(openerWindow, 350, 200);
|
await browser.windows.getCurrent(), 350, 200);
|
||||||
|
|
||||||
const popup = await browser.windows.create({
|
const popup = await browser.windows.create({
|
||||||
url: "ui/popup/index.html"
|
url: "ui/popup/index.html"
|
||||||
@@ -108,7 +108,6 @@ export default class PopupReceiverSelector
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._isOpen = true;
|
this._isOpen = true;
|
||||||
|
|
||||||
this.windowId = popup.id;
|
this.windowId = popup.id;
|
||||||
|
|
||||||
// Size/position not set correctly on creation (bug?)
|
// Size/position not set correctly on creation (bug?)
|
||||||
@@ -175,6 +174,7 @@ export default class PopupReceiverSelector
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
browser.windows.onRemoved.removeListener(this.onWindowsRemoved);
|
||||||
browser.windows.onFocusChanged.removeListener(
|
browser.windows.onFocusChanged.removeListener(
|
||||||
this.onWindowsFocusChanged);
|
this.onWindowsFocusChanged);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user