active theme now shown in the settings page

This commit is contained in:
Jack 2020-05-16 14:21:16 +01:00
parent 7154d3e96d
commit 7a199010c8

View file

@ -9,12 +9,12 @@ function updateSettingsPage(){
}
})
setSettingsButton('smoothCaret', config.smoothCaret);
setSettingsButton('quickTab', config.quickTab);
setSettingsButton('liveWpm', config.showLiveWpm);
setSettingsButton('keyTips', config.showKeyTips);
setActiveThemeButton(config.theme);
if (config.showKeyTips) {
$(".pageSettings .tip").removeClass('hidden');
@ -25,6 +25,11 @@ function updateSettingsPage(){
}
function setActiveThemeButton(theme) {
$(".pageSettings .themes .theme").removeClass('active');
$(".pageSettings .themes .theme[theme=" + theme + "]").addClass('active');
}
function setSettingsButton(buttonSection,tf) {
if (tf) {
$(".pageSettings .section."+buttonSection+" .buttons .button.on").addClass('active');