mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 06:37:30 +09:00
parent
1a634a81bc
commit
9a207124fc
1 changed files with 8 additions and 2 deletions
|
|
@ -22,10 +22,12 @@ this.LightweightThemeConsumer =
|
||||||
this._win = aDocument.defaultView;
|
this._win = aDocument.defaultView;
|
||||||
this._footerId = aDocument.documentElement.getAttribute("lightweightthemesfooter");
|
this._footerId = aDocument.documentElement.getAttribute("lightweightthemesfooter");
|
||||||
|
|
||||||
|
/* XXX: If we want to disable LWTs for PB mode, this would be needed.
|
||||||
|
* Perhaps make this pref-controlled in the future if people want it?
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(this._win) &&
|
if (PrivateBrowsingUtils.isWindowPrivate(this._win) &&
|
||||||
!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||||
return;
|
return;
|
||||||
}
|
} */
|
||||||
|
|
||||||
let screen = this._win.screen;
|
let screen = this._win.screen;
|
||||||
this._lastScreenWidth = screen.width;
|
this._lastScreenWidth = screen.width;
|
||||||
|
|
@ -87,12 +89,16 @@ LightweightThemeConsumer.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
|
/* XXX: If we want to disable LWTs for PB mode, this would be needed.
|
||||||
if (!PrivateBrowsingUtils.isWindowPrivate(this._win) ||
|
if (!PrivateBrowsingUtils.isWindowPrivate(this._win) ||
|
||||||
PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||||
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||||
|
|
||||||
this._win.removeEventListener("resize", this);
|
this._win.removeEventListener("resize", this);
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||||
|
this._win.removeEventListener("resize", this);
|
||||||
|
|
||||||
this._win = this._doc = null;
|
this._win = this._doc = null;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue