mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
code review: safer test
This commit is contained in:
parent
102dc8b596
commit
8262b9ec70
@ -231,11 +231,11 @@
|
|||||||
if ( pos === -1 ) {
|
if ( pos === -1 ) {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
var ext = path.slice(pos);
|
var ext = path.slice(pos) + '.';
|
||||||
if ( '.eot.ttf.otf.svg.woff'.indexOf(ext) !== -1 ) {
|
if ( '.eot.ttf.otf.svg.woff.'.indexOf(ext) !== -1 ) {
|
||||||
return 'stylesheet';
|
return 'stylesheet';
|
||||||
}
|
}
|
||||||
if ( '.ico.png.gif.jpg.jpeg'.indexOf(ext) !== -1 ) {
|
if ( '.ico.png.gif.jpg.jpeg.'.indexOf(ext) !== -1 ) {
|
||||||
return 'image';
|
return 'image';
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
Loading…
Reference in New Issue
Block a user