I am working on an extension for Google Chrome and I realized that my extension will run twice if I include the following in the manifest:
"background":{"page": "popup.html","persistent": true},
However I need the .html file to run in the background in order to load data, if anymore information is required please do let me know.
Edit 1: I have only added the following scripts in HTML, if that gives a clue.
<link rel="stylesheet" type="text/css" href="popup.css">
<script src="jquery-3.2.1.js"></script>
<script src="popup.js"></script>
Thank you!
In the popup.html
you might have included jquery.min.js twice. This will result running all $(document).ready()
events twice
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.