From 5502bf29bdbaa054a96794ddf93ab8cf0bcc2f77 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 17 Oct 2024 10:19:46 +0800 Subject: fix: CRS for addon --- addon/index.mjs | 1 + addon/manifest.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'addon') diff --git a/addon/index.mjs b/addon/index.mjs index 323edf1..2494ec4 100644 --- a/addon/index.mjs +++ b/addon/index.mjs @@ -12,6 +12,7 @@ const simpleRender = window.mapclay.renderWith(config => ({ })) window.generateMaps(document.querySelector('main') ?? document.body, { + crs: url.searchParams.get('crs') ?? 'EPSG:4326', initialLayout: '', render: simpleRender, }) diff --git a/addon/manifest.json b/addon/manifest.json index e97ae50..2d7b1ed 100644 --- a/addon/manifest.json +++ b/addon/manifest.json @@ -12,7 +12,7 @@ "content_scripts": [ { "matches": [ - "*://*.mozilla.org/*", + "*://developer.mozilla.org/*", "*://hackmd.io/*", "*://*.ptt.cc/*" ], @@ -29,6 +29,7 @@ "permissions": [ "activeTab", "tabs", - "scripting" + "scripting", + "https://epsg.io/*" ] } -- cgit v1.2.3-70-g09d2