Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.webRequest.onBeforeRequest.addListener(function (details) {
- return { redirectUrl: 'https://bar.com'};
- }, {urls: ['https://foo.com/']}, ['blocking']);
- {
- "name": "redirect",
- "description": "Redirect foo to bar.",
- "version": "1.0",
- "permissions": ["webRequest", "webRequestBlocking", "https://foo.com/"],
- "background": { "scripts": ["background.js"] },
- "manifest_version": 2
- }
Add Comment
Please, Sign In to add comment