├── src ├── inject_everywhere.css ├── options │ ├── maps_embed.mjs │ ├── framepermission.html │ ├── options.html │ ├── framepermission.js │ ├── options.css │ └── options.mjs ├── inject_main.js ├── popup │ ├── popup.css │ ├── popup.html │ └── popup.js ├── pref.js ├── inject_frame.js ├── permission.js ├── inject_frame_permission.js ├── prefmaker.mjs ├── Scrollability.js ├── inject_everywhere.js ├── background.js └── ScrollableMap.js ├── .github ├── FUNDING.yml └── workflows │ ├── test.yml │ └── codeql-analysis.yml ├── images ├── maps_16.png ├── maps_48.png ├── maps_128.png └── permission_icon.png ├── .gitignore ├── test ├── unit │ ├── fakes.js │ ├── Scrollability_test.js │ └── permission_test.js ├── auto │ ├── maplibre_traveler_map.mjs │ ├── hey_whats_that.mjs │ ├── google_com_travel.mjs │ ├── embedded_maps.mjs │ ├── google_com_maps.mjs │ └── options_page.mjs ├── multimap-test.html ├── chrome_browser_action.js ├── manual │ └── manual_test.js └── mapdriver.js ├── .npmrc ├── manifest_chrome_template.json ├── manifest_template.json ├── package.json ├── README.md ├── gulputils.mjs ├── privacy.md ├── LICENSE └── gulpfile.mjs /src/inject_everywhere.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: mauricelam 2 | -------------------------------------------------------------------------------- /images/maps_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauricelam/ScrollMaps/HEAD/images/maps_16.png -------------------------------------------------------------------------------- /images/maps_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauricelam/ScrollMaps/HEAD/images/maps_48.png -------------------------------------------------------------------------------- /images/maps_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauricelam/ScrollMaps/HEAD/images/maps_128.png -------------------------------------------------------------------------------- /images/permission_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mauricelam/ScrollMaps/HEAD/images/permission_icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | gen/ 3 | node_modules/ 4 | scrollmaps.sublime-workspace 5 | src/options/maps_embed_with_key.mjs 6 | -------------------------------------------------------------------------------- /test/unit/fakes.js: -------------------------------------------------------------------------------- 1 | chrome = { 2 | runtime: { 3 | getManifest() { 4 | return { 5 | version: 10000 6 | } 7 | } 8 | } 9 | }; -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | ;;;; 2 | ; npm userconfig file 3 | ; this is a simple ini-formatted file 4 | ; lines that start with semi-colons are comments. 5 | ; read `npm help config` for help on the various options 6 | ;;;; 7 | -------------------------------------------------------------------------------- /src/options/maps_embed.mjs: -------------------------------------------------------------------------------- 1 | // This URL needs to be overridden to include an API key. 2 | export const SCROLLMAPS_IFRAME_URL = `https://www.google.com/maps/embed/v1/view?zoom=12¢er=37.3861%2C-122.0839`; -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Run Unit Tests 2 | 3 | on: 4 | push: 5 | branches: [ chrome ] 6 | pull_request: 7 | branches: [ chrome ] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Set up Node.js 15 | uses: actions/setup-node@v3 16 | with: 17 | node-version: '18' # Or a version compatible with your project 18 | - name: Install dependencies 19 | run: npm install 20 | - name: Run unit tests 21 | run: gulp unit 22 | -------------------------------------------------------------------------------- /src/inject_main.js: -------------------------------------------------------------------------------- 1 | // Code injected into the "MAIN" execution world. (See chrome.scripting.ExecutionWorld) 2 | 3 | if (window.SM_INJECT_MAIN === undefined) { 4 | window.SM_INJECT_MAIN = true; 5 | 6 | const origSetPointerCapture = Element.prototype.setPointerCapture; 7 | Element.prototype.setPointerCapture = function (pointerId) { 8 | if (pointerId !== 10088) { 9 | origSetPointerCapture.apply(this, arguments); 10 | } 11 | }; 12 | 13 | const origReleasePointerCapture = Element.prototype.releasePointerCapture; 14 | Element.prototype.releasePointerCapture = function (pointerId) { 15 | if (pointerId !== 10088) { 16 | origReleasePointerCapture.apply(this, arguments); 17 | } 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/options/framepermission.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |ScrollMaps extension need additional permission to work in this embedded Google Maps
11 | 12 | 13 |ScrollMaps extension need additional permission to work in this embedded Google Maps