Cleaning space on empty lines. (#248)

This commit is contained in:
Rémy HUBSCHER 2017-09-27 16:40:09 +02:00 коммит произвёл Vlad Filippov
Родитель 50947f902f
Коммит b0b51402b4
3 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -35,7 +35,7 @@ Mozilla Public License Version 2.0
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"

Просмотреть файл

@ -5,9 +5,9 @@
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="settings.css">
</head>
<body>
<div class="settings-content">
<div id="section-theme">
<label id="themeTitle"></label>
@ -19,8 +19,8 @@
<label for="theme_dark" id="dark_label"></label>
</div>
</div>
<script type="text/javascript" src="settings.js"></script>
</body>
</html>

Просмотреть файл

@ -11,7 +11,7 @@ const themeRadioBtn = document.getElementsByName('theme');
function loadSavedData(data) {
const theme = data.theme;
if (theme === 'default')
themeRadioBtn[0].checked = true;
else if (theme === 'dark')
@ -25,25 +25,25 @@ document.addEventListener('DOMContentLoaded', function() {
function getTheme() {
let theme = '';
for (let i = 0; i < themeRadioBtn.length; i++) {
if (themeRadioBtn[i].checked)
theme = themeRadioBtn[i].value;
else
continue;
}
const selectedTheme = {
theme: theme
};
return selectedTheme;
}
for (let i = 0; i < themeRadioBtn.length; i++) {
themeRadioBtn[i].onclick = function() {
const theme = getTheme();
browser.storage.local.set(theme);
// notify background.js that theme settings have changed