It’s possible to add HTML options page to your extension. Simply add options_page key to extension_info.json file:
{
"options_page": "options.html",
}
To use Kango APIs you must include script kango_api.js in your html and use it only after onReady event:
<script type="text/javascript" src="kango-ui/kango_api.js"></script>
You can also open options page programmatically using kango.ui.optionsPage.open().
Note
Kango API available only in async mode (as in content scripts).
Warning
“options_page” key must have value “options.html”. This limitation be fixed in future versions.
options.html:
<html>
<head>
<script type="text/javascript" src="kango-ui/kango_api.js"></script>
<script type="text/javascript" src="options.js"></script>
</head>
<body>
Options
</body>
</html>
options.js:
KangoAPI.onReady(function() {
$('#button-close').click(function(event) {
KangoAPI.closeWindow()
});
alert(kango.browser.getName());
});