13 lines
374 B
JavaScript
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"]);
|