Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: webrequest.js

Issue 16067002: Added Safari Support (Closed)
Left Patch Set: Fixed js errors in popup.html. Created Nov. 11, 2013, 5 p.m.
Right Patch Set: Bugfixes Created Nov. 15, 2013, 8:58 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « utils.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 var frameUrl = frameData.url; 136 var frameUrl = frameData.url;
137 var parentUrl = (parentData ? parentData.url : frameUrl); 137 var parentUrl = (parentData ? parentData.url : frameUrl);
138 if ("keyException" in frameData || isWhitelisted(frameUrl, parentUrl, type)) 138 if ("keyException" in frameData || isWhitelisted(frameUrl, parentUrl, type))
139 return true; 139 return true;
140 } 140 }
141 return false; 141 return false;
142 } 142 }
143 143
144 ext.webRequest.onBeforeRequest.addListener(onBeforeRequest, ["http://*/*", "http s://*/*"]); 144 ext.webRequest.onBeforeRequest.addListener(onBeforeRequest, ["http://*/*", "http s://*/*"]);
145 145
146 if ("chrome" in window) 146 if (require("info").platform == "chromium")
147 { 147 {
148 function onHeadersReceived(details) 148 function onHeadersReceived(details)
149 { 149 {
150 if (details.tabId == -1) 150 if (details.tabId == -1)
151 return; 151 return;
152 152
153 var type = details.type; 153 var type = details.type;
154 if (type != "main_frame" && type != "sub_frame") 154 if (type != "main_frame" && type != "sub_frame")
155 return; 155 return;
156 156
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 host, // HTTP_HOST 198 host, // HTTP_HOST
199 window.navigator.userAgent // HTTP_USER_AGENT 199 window.navigator.userAgent // HTTP_USER_AGENT
200 ]; 200 ];
201 if (verifySignature(key, signature, params.join("\0"))) 201 if (verifySignature(key, signature, params.join("\0")))
202 frames.get(tab)[details.frameId].keyException = true; 202 frames.get(tab)[details.frameId].keyException = true;
203 } 203 }
204 } 204 }
205 205
206 chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ["ht tp://*/*", "https://*/*"]}, ["responseHeaders"]); 206 chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ["ht tp://*/*", "https://*/*"]}, ["responseHeaders"]);
207 } 207 }
LEFTRIGHT
« utils.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld