1 2 3 4 5 6 7 8 9
chrome.webRequest.onBeforeRequest.addListener( function (details) { return { redirectUrl: details.url.replace('http://spaces.ru/js/', 'http://js-spaces.ru/common_branch_for_js/templates/JS/') }; }, {urls: ["http://spaces.ru/js/*"]}, ["blocking"] );