I tried to redirect or cancel some requests with onBeforeRequest, but I found that some requests (looks like type === "main_frame") will be sent before callback function called .
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/66045d85-a806-4e9d-b9d0-79dfecbae711%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
chrome.webRequest.onBeforeRequest.addListener(function(details) { var url = details.url; var type = details.type; //Test: block bing.com.: if (new RegExp("^https?://([^/]*?\.)?bing\.com").test(url)) { // alert("debug:\n" + url + "\n" + type); return { cancel : true }; } }, { urls : ["http://*/*", "https://*/*"] }, ["blocking"]);
@Mo Li I have been using the same API for more than 1 year now and it does not hold true to me.Can we have a look at the code ?Or just tell me the request Url which you are trying to redirect/block.Just for example, You can have a look at this [0].
On Sat, May 23, 2015 at 2:32 PM, Mo Li <lym...@gmail.com> wrote:
I tried to redirect or cancel some requests with onBeforeRequest, but I found that some requests (looks like type === "main_frame") will be sent before callback function called .
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Linux x86_64, Google Chrome 43.0.2357.65 (Official Build) (64-bit).
chrome.webRequest.onBeforeRequest.addListener(function(details) {var url = details.url;var type = details.type;//Test: block bing.com.:if (new RegExp("^https?://([^/]*?\.)?bing\.com").test(url)) {// alert("debug:\n" + url + "\n" + type);return {cancel : true};}}, {urls : ["http://*/*", "https://*/*"]}, ["blocking"]);
On Saturday, May 23, 2015 at 5:53:33 PM UTC+8, Sachin Jain wrote:
@Mo Li I have been using the same API for more than 1 year now and it does not hold true to me.Can we have a look at the code ?Or just tell me the request Url which you are trying to redirect/block.Just for example, You can have a look at this [0].
On Sat, May 23, 2015 at 2:32 PM, Mo Li <lym...@gmail.com> wrote:
I tried to redirect or cancel some requests with onBeforeRequest, but I found that some requests (looks like type === "main_frame") will be sent before callback function called .
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/66045d85-a806-4e9d-b9d0-79dfecbae711%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/f8a7b8cd-b07b-4a7c-a01e-30754d5787a8%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/66045d85-a806-4e9d-b9d0-79dfecbae711%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/66045d85-a806-4e9d-b9d0-79dfecbae711%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/f8a7b8cd-b07b-4a7c-a01e-30754d5787a8%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/8ed50f0d-d45a-4bbf-bd0e-e8ee245c3579%40chromium.org.