Skip to content

Commit dd0bdb4

Browse files
committed
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 e0f1544 commit dd0bdb4

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎chromium/background.js‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,6 @@ function onResponseStarted(details) {
263263
}
264264
}
265265

266-
function onErrorOccurred(details) {
267-
displayPageAction(details.tabId);
268-
}
269-
270-
function onCompleted(details) {
271-
displayPageAction(details.tabId);
272-
}
273-
274266
wr.onBeforeRequest.addListener(onBeforeRequest, {urls: ["https://*/*", "http://*/*"]}, ["blocking"]);
275267

276268
// This watches cookies sent via HTTP.
@@ -285,10 +277,7 @@ wr.onHeadersReceived.addListener(onHeadersReceived, {urls: ["https://*/*"]},
285277

286278
wr.onResponseStarted.addListener(onResponseStarted,
287279
{urls: ["https://*/*", "http://*/*"]});
288-
wr.onErrorOccurred.addListener(onErrorOccurred,
289-
{urls: ["https://*/*", "http://*/*"]});
290-
wr.onCompleted.addListener(onCompleted,
291-
{urls: ["https://*/*", "http://*/*"]});
280+
292281

293282
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
294283
displayPageAction(tabId);

0 commit comments

Comments
 (0)