This commit is contained in:
Ryan Kiernan 2020-09-13 01:45:05 +02:00
parent 7f9243095e
commit 00ec24f8e0
1 changed files with 7 additions and 1 deletions

View File

@ -4,8 +4,9 @@ document.addEventListener('DOMContentLoaded', () => {
document.getElementById('ign2').checked = (g.ign2 == 'y') ? true : false; document.getElementById('ign2').checked = (g.ign2 == 'y') ? true : false;
document.getElementById('obs').checked = (g.obs == 'y') ? true : false; document.getElementById('obs').checked = (g.obs == 'y') ? true : false;
document.getElementById('alt').checked = (g.alt == 'y') ? true : false; document.getElementById('alt').checked = (g.alt == 'y') ? true : false;
document.getElementById('opon').checked = (g.opd != 'n') ? true : false; document.getElementById('opon').checked = (g.opd != 'n' && g.opd != 'l') ? true : false;
document.getElementById('opoff').checked = (g.opd == 'n') ? true : false; document.getElementById('opoff').checked = (g.opd == 'n') ? true : false;
document.getElementById('opol').checked = (g.opd == 'l') ? true : false;
let ul = g.mul || 'eo'; let ul = g.mul || 'eo';
fetch('i18n/' + ul + '.json', { fetch('i18n/' + ul + '.json', {
method: 'GET' method: 'GET'
@ -56,6 +57,11 @@ document.getElementById('opoff').addEventListener('click', () => {
location.reload(); location.reload();
}); });
}); });
document.getElementById('opol').addEventListener('click', () => {
chrome.runtime.sendMessage('dbmode,s2', () => {
location.reload();
});
});
document.getElementById('crs').addEventListener('click', () => { document.getElementById('crs').addEventListener('click', () => {
chrome.runtime.sendMessage('clear', () => { chrome.runtime.sendMessage('clear', () => {
location.reload(); location.reload();