Skip to content

Commit

Permalink
Fix mapy.cz layers
Browse files Browse the repository at this point in the history
Fixes: #16
  • Loading branch information
liskin committed Jun 18, 2023
1 parent 507babf commit 414c001
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
13 changes: 12 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"128": "icons/icon128.png"
},
"permissions": [
"https://www.strava.com/*"
"declarativeNetRequestWithHostAccess",
"https://www.strava.com/*",
"https://mapserver.mapy.cz/*"
],
"content_scripts": [
{
Expand All @@ -20,6 +22,15 @@
]
}
],
"declarative_net_request": {
"rule_resources": [
{
"id": "mapy_cz",
"enabled": true,
"path": "rules_mapy_cz.json"
}
]
},
"web_accessible_resources": [
"3rd/Leaflet.GoogleMutant.js",
"3rd/jquery-3.5.1.min.js",
Expand Down
24 changes: 24 additions & 0 deletions rules_mapy_cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"header": "referer",
"operation": "set",
"value": "https://mapy.cz/"
},
{
"header": "origin",
"operation": "remove"
}
]
},
"condition": {
"initiatorDomains": ["www.strava.com"],
"urlFilter": "||mapserver.mapy.cz/*/*-*-*"
}
}
]

0 comments on commit 414c001

Please sign in to comment.