accept any content-type for text/ except text/html
This commit is contained in:
parent
3a8f47f4db
commit
d183779fb5
|
@ -4,7 +4,8 @@
|
||||||
(() => {
|
(() => {
|
||||||
const installCodeCache = {};
|
const installCodeCache = {};
|
||||||
const clearInstallCode = url => delete installCodeCache[url];
|
const clearInstallCode = url => delete installCodeCache[url];
|
||||||
const isContentTypeText = type => /^text\/(css|plain)(;.*?)?$/i.test(type);
|
/** Sites may be using custom types like text/stylus so this coarse filter only excludes html */
|
||||||
|
const isContentTypeText = type => /^text\/(?!html)/i.test(type);
|
||||||
|
|
||||||
// in Firefox we have to use a content script to read file://
|
// in Firefox we have to use a content script to read file://
|
||||||
const fileLoader = !chrome.app && (
|
const fileLoader = !chrome.app && (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user