Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local File Opton Can't Load Javascript #289

Closed
SalmaBegumJSR opened this issue Nov 28, 2022 · 1 comment
Closed

Local File Opton Can't Load Javascript #289

SalmaBegumJSR opened this issue Nov 28, 2022 · 1 comment
Labels

Comments

@SalmaBegumJSR
Copy link

Greetings,
i am trying to use javascript in local file html, when i load the local file directly it works fine,

but when i load using extension, it shows me following error message:
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). moz-extension:15:9

i tried both inline javascript and also using remote web js file, both render same error message,

after some research i even set following header/meta on head, but still not working

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

so? how can i load the javascript properly? please help me out..

thanks in advance..

@cadeyrn
Copy link
Owner

cadeyrn commented Nov 28, 2022

Hi,

if you want to use a local file without restrictions you have to setup a local server so that you can open the page via https:// or http://. It's very easy with a tool like XAMPP or MAMP. The local file option of New Tab Override only supports the most simple use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants