From 610446e5efcbe3e30762e0f202acb6929c5d5f78 Mon Sep 17 00:00:00 2001 From: ProLoser <67395+ProLoser@users.noreply.github.com> Date: Tue, 17 Nov 2026 00:20:12 +0000 Subject: [PATCH 1/3] Fix deprecated Google Maps glyph option Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/google-maps-checks.yml | 21 ++++++++++++++++ 19hz/map.js | 2 +- map.js | 2 +- scripts/check-google-maps.js | 32 ++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/google-maps-checks.yml create mode 100644 scripts/check-google-maps.js diff --git a/.github/workflows/google-maps-checks.yml b/.github/workflows/google-maps-checks.yml new file mode 100644 index 0000000..3411d1e --- /dev/null +++ b/.github/workflows/google-maps-checks.yml @@ -0,0 +1,21 @@ +name: Google Maps checks +on: + pull_request: + branches: [main] +permissions: + contents: read +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Check JavaScript syntax + run: | + node --check map.js + node --check 19hz/map.js + node --check crawler.js + - name: Check Google Maps best practices + run: node scripts/check-google-maps.js diff --git a/19hz/map.js b/19hz/map.js index 2b23e6c..73ce358 100644 --- a/19hz/map.js +++ b/19hz/map.js @@ -344,7 +344,7 @@ window.filter = async function (filters = {}) { borderColor: "#ffffff", glyphColor: "#ffffff", scale: 1.2, - glyph: clusterCount.toString() + glyphText: clusterCount.toString() }); const clusterMarker = new AdvancedMarkerElement({ diff --git a/map.js b/map.js index f2dc12b..4a60952 100644 --- a/map.js +++ b/map.js @@ -557,7 +557,7 @@ window.filter = async function (filters = {}) { borderColor: "#ffffff", glyphColor: "#ffffff", scale: 1.2, - glyph: clusterCount.toString() + glyphText: clusterCount.toString() }); const clusterMarker = new AdvancedMarkerElement({ diff --git a/scripts/check-google-maps.js b/scripts/check-google-maps.js new file mode 100644 index 0000000..d2a0b12 --- /dev/null +++ b/scripts/check-google-maps.js @@ -0,0 +1,32 @@ +const fs = require("node:fs"); + +let failed = false; + +for (const [javascriptPath, htmlPath] of [["map.js", "index.html"], ["19hz/map.js", "19hz/index.html"]]) { + const javascript = fs.readFileSync(javascriptPath, "utf8"); + const html = fs.readFileSync(htmlPath, "utf8"); + const checks = [ + [/\bglyph\s*:/, "uses the deprecated PinElement glyph option"], + [/new\s+google\.maps\.Marker\s*\(/, "uses deprecated google.maps.Marker"], + ]; + + for (const [pattern, message] of checks) { + if (pattern.test(javascript)) { + console.error(`${javascriptPath} ${message}`); + failed = true; + } + } + + if (!javascript.includes('google.maps.importLibrary("maps")') || !javascript.includes('google.maps.importLibrary("marker")')) { + console.error(`${javascriptPath} must load Maps libraries with importLibrary`); + failed = true; + } + + if (!/]*maps\.googleapis\.com\/maps\/api\/js)(?=[^>]*\bloading=async\b)(?=[^>]*\bcallback=initialize\b)[^>]*>/is.test(html)) { + console.error(`${htmlPath} must load the Maps JavaScript API asynchronously with the initialize callback`); + failed = true; + } +} + +if (failed) process.exitCode = 1; +else console.log("Google Maps checks passed"); From 26da8894f61a0514e0bf6f553e24881911dee80a Mon Sep 17 00:00:00 2001 From: Dean Sofer Date: Mon, 16 Nov 2026 16:23:49 -0800 Subject: [PATCH 2/3] Delete scripts/check-google-maps.js --- scripts/check-google-maps.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/check-google-maps.js diff --git a/scripts/check-google-maps.js b/scripts/check-google-maps.js deleted file mode 100644 index d2a0b12..0000000 --- a/scripts/check-google-maps.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require("node:fs"); - -let failed = false; - -for (const [javascriptPath, htmlPath] of [["map.js", "index.html"], ["19hz/map.js", "19hz/index.html"]]) { - const javascript = fs.readFileSync(javascriptPath, "utf8"); - const html = fs.readFileSync(htmlPath, "utf8"); - const checks = [ - [/\bglyph\s*:/, "uses the deprecated PinElement glyph option"], - [/new\s+google\.maps\.Marker\s*\(/, "uses deprecated google.maps.Marker"], - ]; - - for (const [pattern, message] of checks) { - if (pattern.test(javascript)) { - console.error(`${javascriptPath} ${message}`); - failed = true; - } - } - - if (!javascript.includes('google.maps.importLibrary("maps")') || !javascript.includes('google.maps.importLibrary("marker")')) { - console.error(`${javascriptPath} must load Maps libraries with importLibrary`); - failed = true; - } - - if (!/]*maps\.googleapis\.com\/maps\/api\/js)(?=[^>]*\bloading=async\b)(?=[^>]*\bcallback=initialize\b)[^>]*>/is.test(html)) { - console.error(`${htmlPath} must load the Maps JavaScript API asynchronously with the initialize callback`); - failed = true; - } -} - -if (failed) process.exitCode = 1; -else console.log("Google Maps checks passed"); From 7840dee866a9781a83df3f74a2d2bb0ac8257888 Mon Sep 17 00:00:00 2001 From: Dean Sofer Date: Mon, 16 Nov 2026 16:24:03 -0800 Subject: [PATCH 3/3] Delete .github/workflows/google-maps-checks.yml --- .github/workflows/google-maps-checks.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/google-maps-checks.yml diff --git a/.github/workflows/google-maps-checks.yml b/.github/workflows/google-maps-checks.yml deleted file mode 100644 index 3411d1e..0000000 --- a/.github/workflows/google-maps-checks.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Google Maps checks -on: - pull_request: - branches: [main] -permissions: - contents: read -jobs: - checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 22 - - name: Check JavaScript syntax - run: | - node --check map.js - node --check 19hz/map.js - node --check crawler.js - - name: Check Google Maps best practices - run: node scripts/check-google-maps.js