1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

code review

This commit is contained in:
gorhill 2015-01-21 09:25:12 -05:00
parent 4edfae4b94
commit 4f2bd14ce6

View File

@ -396,6 +396,7 @@ vAPI.net.registerListeners = function() {
details.tabId = details.tabId.toString(); details.tabId = details.tabId.toString();
details.hostname = µburi.hostnameFromURI(details.url); details.hostname = µburi.hostnameFromURI(details.url);
// The rest of the function code is to normalize type
var type = details.type; var type = details.type;
if ( type !== 'other' ) { if ( type !== 'other' ) {
return; return;
@ -410,7 +411,9 @@ vAPI.net.registerListeners = function() {
details.type = 'font'; details.type = 'font';
return; 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'; details.type = 'image';
return; return;
} }