aboutsummaryrefslogtreecommitdiffhomepage
path: root/addon
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-17 10:19:46 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-17 10:19:46 +0800
commit5502bf29bdbaa054a96794ddf93ab8cf0bcc2f77 (patch)
tree56c80a2ef32d2697667aff73af279db5da05c056 /addon
parent6ad14a3daf3292048de1a4c72cabca243d03b103 (diff)
fix: CRS for addon
Diffstat (limited to 'addon')
-rw-r--r--addon/index.mjs1
-rw-r--r--addon/manifest.json5
2 files changed, 4 insertions, 2 deletions
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 => ({
12})) 12}))
13 13
14window.generateMaps(document.querySelector('main') ?? document.body, { 14window.generateMaps(document.querySelector('main') ?? document.body, {
15 crs: url.searchParams.get('crs') ?? 'EPSG:4326',
15 initialLayout: '', 16 initialLayout: '',
16 render: simpleRender, 17 render: simpleRender,
17}) 18})
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 @@
12 "content_scripts": [ 12 "content_scripts": [
13 { 13 {
14 "matches": [ 14 "matches": [
15 "*://*.mozilla.org/*", 15 "*://developer.mozilla.org/*",
16 "*://hackmd.io/*", 16 "*://hackmd.io/*",
17 "*://*.ptt.cc/*" 17 "*://*.ptt.cc/*"
18 ], 18 ],
@@ -29,6 +29,7 @@
29 "permissions": [ 29 "permissions": [
30 "activeTab", 30 "activeTab",
31 "tabs", 31 "tabs",
32 "scripting" 32 "scripting",
33 "https://epsg.io/*"
33 ] 34 ]
34} 35}