OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 chrome.declarativeWebRequest.onRequest.removeRules(); |
| 6 var rule = { |
| 7 conditions: [ |
| 8 new chrome.declarativeWebRequest.RequestMatcher( |
| 9 {url: {pathContains: '.html'}}), |
| 10 ], |
| 11 actions: [ |
| 12 new chrome.declarativeWebRequest.RedirectRequest( |
| 13 {'redirectUrl': 'data:text/plain,redirected1'}) |
| 14 ], |
| 15 } |
| 16 function notifyDone() { |
| 17 chrome.test.sendMessage("done"); |
| 18 } |
| 19 chrome.declarativeWebRequest.onRequest.addRules([rule], notifyDone); |
OLD | NEW |