chrome.webRequest.onBeforeRequest.addListener(
  function(details, callback) {
    // 修改请求的 URL
    if (details.url.indexOf('example.com') != -1) {
      details.url = 'http://www.example.com/';
    }
    // 继续处理请求
    callback({cancel: false, redirectUrl: details.url});
  },
  {urls: ['<all_urls>']},
  ['blocking']
);