Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaode Map tiles is broken #674

Closed
gaotongsh opened this issue Oct 6, 2023 · 2 comments
Closed

Gaode Map tiles is broken #674

gaotongsh opened this issue Oct 6, 2023 · 2 comments

Comments

@gaotongsh
Copy link

Environment

  • Browser: Edge 117.0.2045.55
  • OS: macOS Sonoma 14.0
  • IITC version: 0.36.1

Steps to reproduce

  1. Turn off Map Tiles > Gaode if it is on now
  2. Refresh
  3. Turn on Map Tiles > Gaode
  4. Refresh

Expected behavior

Gaode Map is choosable from the map tiles

Actual behavior

Gaode Map is not there

Console output

Uncaught (in promise) DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
    at o (chrome-extension://febaefghpimpenpigafpolgljcfkeakn/js/content-script.js:23:239)
    at HTMLDocument.a (chrome-extension://febaefghpimpenpigafpolgljcfkeakn/js/content-script.js:23:376)
    at <anonymous>:2:14
o		@	content-script.js:23
a		@	content-script.js:23
(anonymous)	@	VM2895:2

And VM2895 is this snippet:

document.dispatchEvent(new CustomEvent('IITCButtonInitJS',{
    detail: {
        "plugin": {
            "author": "johnd0e",
            "category": "Map Tiles",
            "code": "// ==UserScript==\n// @author         johnd0e\n// @name ... TRUNCATED HERE",
            "description": "Map layers from AutoNavi / Gaode (高德地图)",
            "filename": "basemap-gaode.user.js",
            "icon": "https://iitc.app/extras/plugin-icons/basemap-gaode.png",
            "icon64": "https://iitc.app/extras/plugin-icons/basemap-gaode-64.png",
            "id": "basemap-gaode",
            "name": "Gaode (高德地图) / AutoNavi map",
            "namespace": "https://github.com/IITC-CE/ingress-intel-total-conversion",
            "status": "on",
            "uid": "Gaode (高德地图) / AutoNavi map+https://github.com/IITC-CE/ingress-intel-total-conversion",
            "version": "0.1.1"
        },
        "tab_id": 1403434310
    }
}));

This broke the plugin because the uid field of this snippet contained non-latin Chinese characters.

@xscreach
Copy link
Contributor

xscreach commented Oct 6, 2023

Imho this is issue of the iitc button. Works fine on mobile.

Screenshot_20231006_115703_IITC Mobile Beta.png

@gaotongsh
Copy link
Author

Imho this is issue of the iitc button. Works fine on mobile.

OK then I'll post the bug in the Button repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants