Skip to content

Commit 8706720

Browse files
semenkodiracdeltas
authored andcommitted
Remove useless displayPageAction handlers
We call displayPageAction all the freaking time. It's called in chrome.tabs.onUpdated which takes care of 99.9% of all cases. These two are unnecessary. Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
1 parent 5407479 commit 8706720

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

chromium/background.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,6 @@ function onResponseStarted(details) {
234234
}
235235
}
236236

237-
function onErrorOccurred(details) {
238-
displayPageAction(details.tabId);
239-
}
240-
241-
function onCompleted(details) {
242-
displayPageAction(details.tabId);
243-
}
244-
245237
wr.onBeforeRequest.addListener(onBeforeRequest, {urls: ["https://*/*", "http://*/*"]}, ["blocking"]);
246238

247239
// This watches cookies sent via HTTP.
@@ -251,10 +243,7 @@ wr.onBeforeSendHeaders.addListener(onBeforeSendHeaders, {urls: ["http://*/*"]},
251243

252244
wr.onResponseStarted.addListener(onResponseStarted,
253245
{urls: ["https://*/*", "http://*/*"]});
254-
wr.onErrorOccurred.addListener(onErrorOccurred,
255-
{urls: ["https://*/*", "http://*/*"]});
256-
wr.onCompleted.addListener(onCompleted,
257-
{urls: ["https://*/*", "http://*/*"]});
246+
258247

259248
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
260249
displayPageAction(tabId);

0 commit comments

Comments
 (0)