Code: Select all
{
"name": "mathjax-example",
"version": "1.0",
"manifest_version": 3,
"web_accessible_resources": [
{
"resources": ["mathjax/*", "mathjax-config.js"],
"matches": [ "https://oeis.org/*" ]
}
],
"content_scripts": [
{
"js": ["content.js", "mathjax-config.js", "mathjax/es5/tex-mml-chtml.js"],
"matches": [ "https://oeis.org/*" ]
}
],
"content_security_policy": {
"extension_pages": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; font-src 'self'; style-src 'self' 'unsafe-inline'; script-src-elem 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' https://oeis.org;"
}
}
< /code>
Der Besuch der angegebenen Site gibt mir jedoch den folgenden Fehler in der Konsole: < /p>
tex-mml-chtml.js:1 Refused to load the script 'https://../es5/input/asciimath.js' because it violates the following Content Security Policy directive:
"script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:* chrome-extension://d9272ae4-ea80-492e-a847-191300b9c6fa/".
Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Code: Select all
< /code>
Also ist entweder Mathjax unsicher geschrieben oder (wahrscheinlicher) habe ich etwas falsch konfiguriert. Was ich verwirrt bin, ist der Fehler "'script-src-elem' was not explicitly set
Ich bin sehr neu in JavaScript, daher wären alle Erkenntnisse sehr geschätzt!