Skip to content

Commit 5ad5123

Browse files
Add Chrome extension for opening webpage datasets (#1932)
* feat: add GeoLibre Chrome data opener * style: auto-format (ruff + oxfmt) [pre-commit.ci] * fix: address Chrome extension review feedback * ci: attach Chrome extension to releases * docs: install Chrome extension from release * refactor: rename Chrome extension package * feat: link Chrome extension to GeoLibre * style: auto-format (ruff + oxfmt) [pre-commit.ci] * ci: disable caching in release builds --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d5c0bda commit 5ad5123

21 files changed

Lines changed: 1428 additions & 2 deletions

.github/workflows/release.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,40 @@ concurrency:
1212
cancel-in-progress: false
1313

1414
jobs:
15+
chrome-extension:
16+
name: Build Chrome extension
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v7
21+
with:
22+
persist-credentials: false
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v7
26+
with:
27+
node-version: "22"
28+
package-manager-cache: false
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build Chrome extension
34+
run: npm run build:chrome-extension
35+
36+
- name: Upload Chrome extension workflow artifact
37+
uses: actions/upload-artifact@v7
38+
with:
39+
name: geolibre-chrome-extension
40+
path: dist/geolibre-chrome-*.zip
41+
if-no-files-found: error
42+
43+
- name: Attach Chrome extension to GitHub Release
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
TAG: ${{ github.event.release.tag_name }}
47+
run: gh release upload "$TAG" dist/geolibre-chrome-*.zip
48+
1549
build:
1650
name: Build ${{ matrix.name }}
1751
runs-on: ${{ matrix.os }}
@@ -51,8 +85,7 @@ jobs:
5185
uses: actions/setup-node@v7
5286
with:
5387
node-version: lts/*
54-
cache: npm
55-
cache-dependency-path: package-lock.json
88+
package-manager-cache: false
5689

5790
- name: Install Rust stable
5891
uses: dtolnay/rust-toolchain@stable

docs/user-guide/adding-data.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The **Add Data** menu is the main way to bring layers into GeoLibre. It groups sources into Files, Web services, Cloud formats, 3D layers, and Databases. You can also drag files straight onto the map.
44

5+
To collect supported dataset links from a catalog or other webpage and open several at once, use the [GeoLibre Chrome extension](chrome-extension.md).
6+
57
![Add Data menu](https://data.geolibre.app/images/geolibre-add-data-menu.webp)
68

79
## Files
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Chrome Extension
2+
3+
The **Open data in GeoLibre** Chrome extension finds supported geospatial data links on the current webpage and opens the datasets you select together on one GeoLibre map.
4+
5+
![Select webpage datasets with the GeoLibre Chrome extension](https://assets.geolibre.app/images/geolibre-chrome.webp)
6+
7+
## Install the extension
8+
9+
Until the extension is available from the Chrome Web Store, install the packaged release manually:
10+
11+
1. Open the [latest GeoLibre release](https://github.com/opengeos/GeoLibre/releases/latest) and download the ZIP asset whose name starts with `geolibre-chrome-`.
12+
2. Extract the ZIP archive to a folder you intend to keep. Chrome loads the extension from this folder, so do not delete it after installation.
13+
3. Open `chrome://extensions` in Chrome.
14+
4. Turn on **Developer mode**.
15+
5. Select **Load unpacked** and choose the extracted `geolibre-chrome-<version>` folder.
16+
6. Pin **Open data in GeoLibre** to the Chrome toolbar for convenient access.
17+
18+
To update a manually installed copy, download and extract the newer release asset, then select the extension's **Reload** button on `chrome://extensions`. If you extract it to a different folder, remove the old copy and load the new folder instead.
19+
20+
## Open datasets from a webpage
21+
22+
1. Visit a webpage or data catalog containing geospatial file links.
23+
2. Select the GeoLibre icon in the Chrome toolbar.
24+
3. Use **All**, **Vector**, or **Raster** to filter the discovered datasets.
25+
4. Check one or more datasets. Nothing is selected by default.
26+
5. Select **Open in GeoLibre** to load the selected datasets on the same map.
27+
28+
The extension recognizes GeoJSON and spatial JSON, GeoParquet and Parquet, PMTiles, GeoTIFF and Cloud-Optimized GeoTIFF, ZIP archives containing GeoJSON, JSON-LD download metadata, and existing GeoLibre data links. On Source Cooperative repository pages, it also reads the embedded inventory so datasets outside the currently visible list can be selected.
29+
30+
## Access and privacy
31+
32+
GeoLibre fetches selected links directly, so the source server must allow cross-origin requests (CORS). Complete HTTP(S) URLs, including signed query parameters, are forwarded to GeoLibre. Cookies and other browser-session credentials are not forwarded, so cookie-bound or session-authenticated links might fail. Temporary `blob:` URLs cannot be transferred.
33+
34+
The extension requests access only to the active tab when you open it. It does not store browsing history, send analytics, or run continuously in the background.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Privacy policy — Open data in GeoLibre
2+
3+
Last updated: August 15, 2026
4+
5+
Open data in GeoLibre does not independently collect, retain, or sell personal
6+
information, browsing history, page contents, or usage analytics. It does
7+
forward the complete dataset and style URLs that the user explicitly selects,
8+
as described below.
9+
10+
The extension uses Chrome's `activeTab` permission to inspect links and
11+
structured metadata on the current page only after the user clicks the
12+
extension's toolbar icon. Inspection happens locally in the browser. Results
13+
are held in memory only while the popup is open.
14+
15+
When the user chooses **Open in GeoLibre**, the complete selected HTTP(S)
16+
dataset and style URLs are placed in the query string of a new
17+
`https://web.geolibre.app/` tab. These URLs are forwarded verbatim and may
18+
contain signed query parameters, access tokens, user identifiers, or other
19+
personal data. Do not select a URL containing information you do not want to
20+
send to GeoLibre.
21+
22+
The navigation request exposes its URL and the user's IP address to GeoLibre's
23+
web-hosting infrastructure, where standard service logs may retain them. The
24+
navigation may also appear in browser history. See the current
25+
[GeoLibre privacy policy](https://geolibre.app/privacy/) for the service's data
26+
practices. The extension itself does not retain the URLs after its popup closes.
27+
28+
The extension does not fetch or upload the datasets. GeoLibre requests them
29+
directly from their original servers, subject to those servers' privacy
30+
policies and CORS configuration. Cookies and other browser-session credentials
31+
from the source page are not forwarded, although credentials embedded directly
32+
in a selected URL are part of the URL and are forwarded.
33+
34+
The extension uses no remote code, advertising, analytics, tracking pixels,
35+
cookies, accounts, or extension storage.
36+
37+
Questions may be submitted through the GeoLibre repository:
38+
<https://github.com/opengeos/GeoLibre/issues>.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Open data in GeoLibre
2+
3+
A Manifest V3 Chrome extension that finds supported geospatial dataset links on
4+
the current page and opens selected files together in GeoLibre using repeated
5+
`data` query parameters.
6+
7+
## Install locally
8+
9+
1. Open `chrome://extensions`.
10+
2. Enable **Developer mode**.
11+
3. Choose **Load unpacked**.
12+
4. Select this `extensions/geolibre-chrome` directory.
13+
14+
The extension requests `activeTab` and `scripting` only. It scans a page after
15+
you click its toolbar icon and does not retain page contents or browsing data.
16+
17+
## Package for the Chrome Web Store
18+
19+
From the repository root, run:
20+
21+
```bash
22+
npm run build:chrome-extension
23+
```
24+
25+
The versioned upload ZIP is written to `dist/`. Store listing copy and
26+
permission explanations are in `STORE_LISTING.md`; the publishable privacy
27+
policy source is in `PRIVACY.md`. The policy must be hosted at a public URL
28+
before submitting the listing.
29+
30+
## Discovery
31+
32+
The scanner recognizes GeoJSON/JSON, GeoParquet/Parquet, PMTiles, GeoTIFF/COG,
33+
and ZIP links in anchors, linked resources, selected data attributes, and
34+
schema.org JSON-LD `contentUrl`/`downloadUrl` fields. Existing GeoLibre deep
35+
links are unpacked, and a neighboring `name.style.json` or
36+
`name.geolibre.style.json` link is paired with the matching dataset.
37+
38+
Source Cooperative repository pages receive additional handling: the extension
39+
reads the complete embedded file inventory even when the visible table is
40+
virtualized, canonicalizes links to `data.source.coop`, and removes duplicate
41+
page/download links. The popup can filter discovered files by vector or raster
42+
type without changing the current selection.
43+
44+
Remote servers must allow GeoLibre to fetch the selected URLs through CORS.
45+
Complete HTTP(S) URLs, including signed query parameters, are forwarded to
46+
GeoLibre. Cookies and other browser-session credentials are not forwarded, so
47+
cookie-bound or session-authenticated links may fail. Temporary `blob:` and
48+
browser-internal links cannot be transferred.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Chrome Web Store listing
2+
3+
## Name
4+
5+
Open data in GeoLibre
6+
7+
## Summary
8+
9+
Find geospatial datasets on a webpage and open selected files together in GeoLibre.
10+
11+
## Detailed description
12+
13+
Open data in GeoLibre turns dataset catalogs, documentation pages, and project
14+
websites into launch points for an interactive map.
15+
16+
Click the extension icon to find supported data links on the current page,
17+
filter them by vector or raster type, choose the files you need, and open them
18+
together in GeoLibre. Supported links include GeoJSON, GeoParquet, PMTiles,
19+
Cloud-Optimized GeoTIFF, and ZIP archives containing GeoJSON.
20+
21+
The extension also reads schema.org download metadata, understands existing
22+
GeoLibre links, pairs matching GeoLibre style files, and discovers the complete
23+
file inventory on virtualized Source Cooperative repository pages.
24+
25+
Privacy is deliberately narrow: the extension scans only the active page after
26+
you click it. It stores no browsing data, runs no analytics, and requests no
27+
permanent access to websites.
28+
29+
Dataset servers must allow browser access through CORS. Complete HTTP(S) URLs,
30+
including signed query parameters, are forwarded to GeoLibre. Cookies and other
31+
browser-session credentials are not forwarded, so cookie-bound or
32+
session-authenticated links may fail. Temporary `blob:` links cannot be
33+
transferred.
34+
35+
## Category
36+
37+
Developer Tools
38+
39+
## Language
40+
41+
English
42+
43+
## Permission justification
44+
45+
- `activeTab`: grants temporary access to the page only after the user invokes
46+
the extension, so its dataset links can be inspected.
47+
- `scripting`: injects the local, packaged dataset scanner into that active tab.
48+
49+
The extension does not request host permissions, storage, browsing history,
50+
downloads, cookies, or remote code.
21.3 KB
Loading
1.54 KB
Loading
2.7 KB
Loading
4.88 KB
Loading

0 commit comments

Comments
 (0)