Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 | 328 |
329 var handlerBehaviorChangedQuota = chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANG ED_CALLS_PER_10_MINUTES; | 329 var handlerBehaviorChangedQuota = chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANG ED_CALLS_PER_10_MINUTES; |
330 | 330 |
331 function propagateHandlerBehaviorChange() | 331 function propagateHandlerBehaviorChange() |
332 { | 332 { |
333 // Make sure to not call handlerBehaviorChanged() more often than allowed | 333 // Make sure to not call handlerBehaviorChanged() more often than allowed |
334 // by chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES. | 334 // by chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES. |
335 // Otherwise Chrome notifies the user that this extension is causing issues. | 335 // Otherwise Chrome notifies the user that this extension is causing issues. |
336 if (handlerBehaviorChangedQuota > 0) | 336 if (handlerBehaviorChangedQuota > 0) |
337 { | 337 { |
338 chrome.webNavigation.onBeforeNavigate.removeListener(handlerBehaviorChange d); | 338 chrome.webNavigation.onBeforeNavigate.removeListener(propagateHandlerBehav iorChange); |
Wladimir Palant
2015/04/10 06:58:14
Feel free to change the name here as well. Please
Sebastian Noack
2015/04/10 07:03:21
Done.
| |
339 chrome.webRequest.handlerBehaviorChanged(); | 339 chrome.webRequest.handlerBehaviorChanged(); |
340 | 340 |
341 handlerBehaviorChangedQuota--; | 341 handlerBehaviorChangedQuota--; |
342 setTimeout(function() { handlerBehaviorChangedQuota++; }, 600000); | 342 setTimeout(function() { handlerBehaviorChangedQuota++; }, 600000); |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 ext.webRequest = { | 346 ext.webRequest = { |
347 onBeforeRequest: new ext._EventTarget(), | 347 onBeforeRequest: new ext._EventTarget(), |
348 handlerBehaviorChanged: function() | 348 handlerBehaviorChanged: function() |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 callback(new Page(tab)); | 556 callback(new Page(tab)); |
557 } | 557 } |
558 else | 558 else |
559 { | 559 { |
560 ext.pages.open(optionsUrl, callback); | 560 ext.pages.open(optionsUrl, callback); |
561 } | 561 } |
562 }); | 562 }); |
563 }); | 563 }); |
564 }; | 564 }; |
565 })(); | 565 })(); |
LEFT | RIGHT |