Make urls const

This commit is contained in:
clerie 2020-07-03 21:12:25 +02:00
parent 232d1e5b30
commit 2a0c333b9d

View File

@ -1,12 +1,12 @@
const urls = [
"*://*.tile.openstreetmap.org/*"
]
function replaceTileserver(request) {
var url = request.url.replace("tile.openstreetmap.org", "tiles.demostat.de");
console.log("custom-openstreetmap-tile-server: " + request.url + " -> " + url);
return {redirectUrl: url};
}
urls = [
"*://*.tile.openstreetmap.org/*"
]
chrome.webRequest.onBeforeRequest.addListener(replaceTileserver, {urls: urls}, ["blocking"]);