Chrome extension options not calling javascript file
I have an options page in my Chrome extension that calls a javascript file. I tried using javascript to save my parameters, but it didn't work, so I tested it with very simple code:
options.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript" src="jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="options.js"></script>
</body>
</html>
options.js
$(document).ready(function() {
alert('loaded');
console.log('loaded');
});
Neither how alert
nor console.log
does it fire when I click options
on the Chrome extensions page. This leads me to think that the file is options.html
not loading the file js
, but it may be that I am mistaken in expecting that alert
and console.log
will work the way they do with extensions.
Any ideas what is going wrong here?
source to share