Answer the question
In order to leave comments, you need to log in
Chrome extension crashes. Scripts don't work. Security policy?
Just started making extensions for Chrome.
The goal is to make a javascript parser.
I want to make a frame in which I will load the page for parsing and I need to access its elements from the main window.
Since you just can’t get through to a frame from another domain because of the security policy, I decided to make an extension.
That's just how to be there with security policies? There are a lot of errors in the console - scripts do not work - in general, something is not right.
Here is the manifest code
{
"name": "myParser",
"manifest_version": 2,
"version": "2.0",
"description": "Parser",
"permissions": [
"<all_urls>",
"unlimitedStorage"
],
"app": {
"launch": {
"local_path": "main.html"
}
},
"icons": {
"16": "css/images/Spider-16.png"
}
}
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/my.js"></script>
<frameset cols="250,*">
<frame src="page1.html" name="topFrame" >
<frame src="ЗДЕСЬ УРЛ САЙТА,КОТОРЫЙ ПАРСИМ" name="topFrame" scrolling="no" id="Parseframe">
</frameset>
Answer the question
In order to leave comments, you need to log in
Try adding sha256-abracadabra to your manifest, unless of course it changes when you restart
Content-Security-Policy: script-src 'sha256-your abracadabra'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question