From 184aec1409dbd2c5cfe73d522c6dfe945b590d75 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 21 Jan 2015 09:25:12 -0500 Subject: [PATCH] code review --- platform/chromium/vapi-background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index a8f260f..22f68c8 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -396,6 +396,7 @@ vAPI.net.registerListeners = function() { details.tabId = details.tabId.toString(); details.hostname = µburi.hostnameFromURI(details.url); + // The rest of the function code is to normalize type var type = details.type; if ( type !== 'other' ) { return; @@ -410,7 +411,9 @@ vAPI.net.registerListeners = function() { details.type = 'font'; return; } - if ( '.ico.'.indexOf(ext) !== -1 ) { + // Still need this because often behind-the-scene requests are wrongly + // categorized as 'other' + if ( '.ico.png.gif.jpg.jpeg.webp.'.indexOf(ext) !== -1 ) { details.type = 'image'; return; }