Skip to content

Commit

Permalink
📄 Add license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
trickypr committed Jan 5, 2024
1 parent 58f67b6 commit bbdb620
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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/. -->

<script lang="ts">
export let zoom: number
</script>
Expand Down
6 changes: 2 additions & 4 deletions apps/content/src/browser/lib/window/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
10 changes: 5 additions & 5 deletions apps/modules/lib/ZoomStore.sys.mjs
Original file line number Diff line number Diff line change
@@ -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
/// <reference types="@browser/link" />
import mitt from 'resource://app/modules/mitt.sys.mjs'
Expand Down Expand Up @@ -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
}

/**
Expand Down
4 changes: 4 additions & 0 deletions libs/link/types/modules/ZoomStore.d.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit bbdb620

Please sign in to comment.