More CssStyleApplier updates (#1785)
* Update eslint rules for css-style-applier.js * Don't use chrome.runtime.getURL * Update CSP to allow inline styles
This commit is contained in:
parent
56b2462f13
commit
a4715935cb
@ -112,6 +112,7 @@
|
|||||||
"ext/js/core.js",
|
"ext/js/core.js",
|
||||||
"ext/js/data/anki-note-data-creator.js",
|
"ext/js/data/anki-note-data-creator.js",
|
||||||
"ext/js/display/structured-content-generator.js",
|
"ext/js/display/structured-content-generator.js",
|
||||||
|
"ext/js/dom/css-style-applier.js",
|
||||||
"ext/js/language/dictionary-data-util.js",
|
"ext/js/language/dictionary-data-util.js",
|
||||||
"ext/js/templates/template-renderer.js"
|
"ext/js/templates/template-renderer.js"
|
||||||
],
|
],
|
||||||
@ -125,6 +126,7 @@
|
|||||||
"ext/js/core.js",
|
"ext/js/core.js",
|
||||||
"ext/js/data/anki-note-data-creator.js",
|
"ext/js/data/anki-note-data-creator.js",
|
||||||
"ext/js/display/structured-content-generator.js",
|
"ext/js/display/structured-content-generator.js",
|
||||||
|
"ext/js/dom/css-style-applier.js",
|
||||||
"ext/js/language/dictionary-data-util.js",
|
"ext/js/language/dictionary-data-util.js",
|
||||||
"ext/js/templates/template-renderer.js"
|
"ext/js/templates/template-renderer.js"
|
||||||
],
|
],
|
||||||
@ -155,6 +157,7 @@
|
|||||||
"ext/js/yomichan.js",
|
"ext/js/yomichan.js",
|
||||||
"ext/js/data/anki-note-data-creator.js",
|
"ext/js/data/anki-note-data-creator.js",
|
||||||
"ext/js/display/structured-content-generator.js",
|
"ext/js/display/structured-content-generator.js",
|
||||||
|
"ext/js/dom/css-style-applier.js",
|
||||||
"ext/js/language/dictionary-data-util.js",
|
"ext/js/language/dictionary-data-util.js",
|
||||||
"ext/js/templates/template-renderer.js"
|
"ext/js/templates/template-renderer.js"
|
||||||
],
|
],
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
"pages": [
|
"pages": [
|
||||||
"template-renderer.html"
|
"template-renderer.html"
|
||||||
],
|
],
|
||||||
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'"
|
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'unsafe-inline'"
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"<all_urls>",
|
"<all_urls>",
|
||||||
|
@ -83,7 +83,7 @@ class CssStyleApplier {
|
|||||||
// Private
|
// Private
|
||||||
|
|
||||||
async _fetchJsonAsset(url) {
|
async _fetchJsonAsset(url) {
|
||||||
const response = await fetch(chrome.runtime.getURL(url), {
|
const response = await fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
mode: 'no-cors',
|
mode: 'no-cors',
|
||||||
cache: 'default',
|
cache: 'default',
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
"pages": [
|
"pages": [
|
||||||
"template-renderer.html"
|
"template-renderer.html"
|
||||||
],
|
],
|
||||||
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'"
|
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'unsafe-inline'"
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"<all_urls>",
|
"<all_urls>",
|
||||||
|
Loading…
Reference in New Issue
Block a user