diff --git a/apps/content/src/browser/components/omnibox/ZoomDisplay.svelte b/apps/content/src/browser/components/omnibox/ZoomDisplay.svelte index e1fb3da..07c8deb 100644 --- a/apps/content/src/browser/components/omnibox/ZoomDisplay.svelte +++ b/apps/content/src/browser/components/omnibox/ZoomDisplay.svelte @@ -1,3 +1,7 @@ + + diff --git a/apps/content/src/browser/lib/window/tab.ts b/apps/content/src/browser/lib/window/tab.ts index 756d09a..ea3ddbc 100644 --- a/apps/content/src/browser/lib/window/tab.ts +++ b/apps/content/src/browser/lib/window/tab.ts @@ -166,10 +166,8 @@ export class Tab { } zoomChange = (event: ZoomStoreEvents['setZoom']) => { - try { - if (this.uri.readOnce().host != event.host) return - this.zoom.set(event.zoom) - } catch {} + if (this.uri.readOnce().asciiHost != event.host) return + this.zoom.set(event.zoom) } protected useProgressListener() { diff --git a/apps/modules/lib/ZoomStore.sys.mjs b/apps/modules/lib/ZoomStore.sys.mjs index 3ce2cac..e64ecc6 100644 --- a/apps/modules/lib/ZoomStore.sys.mjs +++ b/apps/modules/lib/ZoomStore.sys.mjs @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + // @ts-check /// import mitt from 'resource://app/modules/mitt.sys.mjs' @@ -65,11 +69,7 @@ class ZoomStoreImpl { * @returns {number} */ getZoomForUri(uri) { - try { - return this.zoomPages?.get(uri.host) || 1 - } catch { - return 1 - } + return this.zoomPages?.get(uri.asciiHost) || 1 } /** diff --git a/libs/link/types/modules/ZoomStore.d.ts b/libs/link/types/modules/ZoomStore.d.ts index 8a3f6fd..ff6ba0d 100644 --- a/libs/link/types/modules/ZoomStore.d.ts +++ b/libs/link/types/modules/ZoomStore.d.ts @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + declare module 'resource://app/modules/ZoomStore.sys.mjs' { import { Emitter } from 'mitt'