diff --git a/background.js b/background.js index d24b66a..10de2ad 100644 --- a/background.js +++ b/background.js @@ -105,8 +105,14 @@ function patchCSP(csp) { let stylesrc = parsed_csp['style-src'] || []; if (! stylesrc.includes("'unsafe-inline'") ) { - stylesrc.push("'unsafe-inline'"); - parsed_csp['style-src'] = stylesrc; + let newstylesrc = ["'unsafe-inline'"]; + + for (let src of stylesrc) { + if (!src.startsWith("'nonce") && !src.startsWith('sha')) + newstylesrc.push(src); + } + + parsed_csp['style-src'] = newstylesrc; let new_csp = ""; diff --git a/manifest.json b/manifest.json index 449251e..93cfbfd 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "RSSPreview", - "version": "3.20", + "version": "3.20.1", "author": "Aurelien David", "homepage_url": "https://github.com/aureliendavid/rsspreview",