Add log function

This commit is contained in:
clerie 2020-07-03 21:22:22 +02:00
parent 2a0c333b9d
commit d72e904a20

View File

@ -2,9 +2,13 @@ const urls = [
"*://*.tile.openstreetmap.org/*" "*://*.tile.openstreetmap.org/*"
] ]
function log(msg) {
console.log("custom-openstreetmap-tile-server: " + msg)
}
function replaceTileserver(request) { function replaceTileserver(request) {
var url = request.url.replace("tile.openstreetmap.org", "tiles.demostat.de"); var url = request.url.replace("tile.openstreetmap.org", "tiles.demostat.de");
console.log("custom-openstreetmap-tile-server: " + request.url + " -> " + url); console.log("custom-openstreetmap-tile-server: " + request.url + " -> " + url);
log(request.url + " -> " + url);
return {redirectUrl: url}; return {redirectUrl: url};
} }