Skip to content

Commit 2a8161f

Browse files
authored
Merge pull request #22 from nobkd/use-nue
Use nue
2 parents 6ebab15 + c7ba721 commit 2a8161f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+413
-672
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
run: bun run bundle
2828

2929
- name: Bundle source
30-
run: git archive --format=zip ${{ github.event.release.tag_name }} --output .out/replace_maps_source.zip
30+
run: git archive --format=zip ${{ github.event.release.tag_name }} --output .dist/replace_maps_source.zip
3131

3232
- name: Release
3333
uses: browser-actions/release-firefox-addon@latest
3434
with:
3535
36-
addon-path: .out/replace_maps.zip
37-
source-path: .out/replace_maps_source.zip
36+
addon-path: .dist/replace_maps.zip
37+
source-path: .dist/replace_maps_source.zip
3838
approval-note: Follow the instructions in AMO-README.md
3939
release-note: ${{ github.event.release.body }} # TODO: convert md to html, h1-6 not allowed... Currently ignoring this problem, as the field is needed for publishing
4040
license: MPL-2.0

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
22
.dist/
3-
.out/
43

54
.version-update
65
.env
6+
7+
src/@lib/**/*.png

AMO-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ This uses the `package-lock.json` file for installation to avoid package changes
1818
bun run build && bun run bundle
1919
```
2020

21-
This minifies the JavaScript, copies static resources and bundles the output to `.out/replace_maps.zip`.
21+
This minifies the JavaScript, copies static resources and bundles the output to `.dist/replace_maps.zip`.

README.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -27,67 +27,12 @@ As a result, the response is an extension page that contains a [Leaflet](https:/
2727

2828
You can turn the extension off for every hostname by using the browser action button or by using the settings page.
2929

30-
### Extension Flowchart
31-
32-
```mermaid
33-
flowchart TD
34-
35-
subgraph action [Browser Action]
36-
actionclick(Action Icon) -->|add / remove| storage[(Disabled Hostnames)]
37-
settings(Settings Page) -->|add / remove| storage
38-
end
39-
40-
41-
subgraph reqres [Request-Response Sytem]
42-
req([Frame Request]) --> url{Matches\nGoogle Maps\nURL?}
43-
url -->|no| nomatch([Continue Original Request])
44-
45-
url -->|yes| match{Hostname\nDisabled?}
46-
storage -->|provide hostnames| match
47-
match -->|no| res([Redirect to extension map page])
48-
match -->|yes| nomatch
49-
50-
end
51-
52-
res -->|use params| params
53-
54-
subgraph dec [Search-Param Decoding]
55-
params(Search Params) -->|has q| q([readQ])
56-
q -->|with title| pos[Marker/s]
57-
params -->|has z| zoom[Zoom]
58-
59-
params -->|has pb| pb([readPB])
60-
pb -->|has| minfo[Marker Info]
61-
pb -->|has| marea[Map Area]
62-
63-
minfo -->|has\nsearch string| q
64-
minfo -->|has\n0x...:0x...| cid[CID]
65-
cid -.->|unknown usage| pos
66-
minfo -->|has\nDMS coords| dms([parseDMS])
67-
dms --> pos
68-
69-
pb -->|has| mtype[Map Type]
70-
71-
marea -->|has\ncoords| mcoords[Map Coords]
72-
marea -->|has\naltitude| mzoom([getMapZoom])
73-
mzoom --> zoom
74-
75-
pos --> mdata[(Map Data)]
76-
mtype --> mdata
77-
mcoords --> mdata
78-
zoom --> mdata
79-
end
80-
81-
mdata -->|use map data| mview([Load Leaflet Map])
82-
```
83-
8430
### Known issues
8531

8632
- Sometimes the zoom level is completely wrong
8733
- Not working when a website does not use an iFrame / embed
8834
- Not working when iFrame uses only CIDs
8935
- No routes, just positions
90-
- If insufficient information is gathered, the map stays blank
9136

9237
<!-- Badges & Links -->
9338
[badge-license]: https://img.shields.io/github/license/nobkd/replace-maps

build-icons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { join } from 'path'
33
import { mkdirSync } from 'fs'
44

55
const indir = 'icons'
6-
const outdir = 'public/icons'
6+
const outdir = 'src/icons'
77
const svgs = ['icon-grey.svg', 'icon.svg']
88
const sizes = [48, 96]
99

build.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

bump.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { writeFileSync } from 'node:fs'
22
import { version } from './package.json' with { type: 'json' }
3-
import manifest from './public/manifest.json' with { type: 'json' }
3+
import manifest from './src/manifest.json' with { type: 'json' }
44

55
manifest.version = version
6-
writeFileSync('./public/manifest.json', JSON.stringify(manifest, null, 2))
6+
writeFileSync('./src/manifest.json', JSON.stringify(manifest, null, 2))

bun.lock

Lines changed: 34 additions & 15 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)