| Index: lib/cssInjection.js |
| =================================================================== |
| --- a/lib/cssInjection.js |
| +++ b/lib/cssInjection.js |
| @@ -75,20 +75,23 @@ |
| cssOrigin: "user", |
| frameId, |
| matchAboutBlank: true, |
| runAt: "document_start" |
| }); |
| } |
| catch (error) |
| { |
| - userStyleSheetsSupported = false; |
| + if (/\bcssOrigin\b/.test(error.message)) |
| + userStyleSheetsSupported = false; |
| + |
| + return false; |
| } |
| - return userStyleSheetsSupported; |
| + return true; |
| } |
| function removeStyleSheet(tabId, frameId, styleSheet) |
| { |
| if (!styleSheetRemovalSupported) |
| return; |
| browser.tabs.removeCSS(tabId, { |