custom-openstreetmap-tile-s.../js/background.js
2020-07-03 20:54:27 +02:00

13 lines
374 B
JavaScript

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"]);