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