cleanup
This commit is contained in:
parent
32680c58b8
commit
eed630e9fa
@ -40,6 +40,6 @@ class Backend {
|
||||
static instance() {
|
||||
return chrome.extension.getBackgroundPage().yomichanBackend;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
window.yomichanBackend = new Backend();
|
||||
|
@ -18,16 +18,14 @@
|
||||
|
||||
|
||||
$(document).ready(() => {
|
||||
const commandExec = command => instYomi().onCommand(command);
|
||||
|
||||
$('#open-search').click(() => commandExec('search'));
|
||||
$('#open-options').click(() => commandExec('options'));
|
||||
$('#open-help').click(() => commandExec('help'));
|
||||
$('#open-search').click(() => utilCommandDispatch('search'));
|
||||
$('#open-options').click(() => utilCommandDispatch('options'));
|
||||
$('#open-help').click(() => utilCommandDispatch('help'));
|
||||
|
||||
optionsLoad().then(options => {
|
||||
const toggle = $('#enable-search');
|
||||
toggle.prop('checked', options.general.enable).change();
|
||||
toggle.bootstrapToggle();
|
||||
toggle.change(() => commandExec('toggle'));
|
||||
toggle.change(() => utilCommandDispatch('toggle'));
|
||||
});
|
||||
});
|
||||
|
@ -27,13 +27,16 @@
|
||||
<button type="button" id="open-help" title="Help" class="btn btn-default btn-xs glyphicon glyphicon-question-sign"></button>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<script src="/mixed/lib/jquery.min.js"></script>
|
||||
<script src="/mixed/lib/bootstrap-toggle/bootstrap-toggle.min.js"></script>
|
||||
<script src="/mixed/lib/handlebars.min.js"></script>
|
||||
|
||||
<script src="/bg/js/api.js"></script>
|
||||
<script src="/bg/js/dictionary.js"></script>
|
||||
<script src="/mixed/js/request.js"></script>
|
||||
<script src="/mixed/js/japanese.js"></script>
|
||||
<script src="/bg/js/options.js"></script>
|
||||
<script src="/bg/js/popup.js"></script>
|
||||
<script src="/mixed/js/japanese.js"></script>
|
||||
<script src="/mixed/js/request.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user