434
editsshortened it for a quicker response
Crashaholic (talk | contribs) m (hm) |
Crashaholic (talk | contribs) (shortened it for a quicker response) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
} | } | ||
if ($(" | if ($('html').hasClass("skin-citizen-light")) | ||
{ | { | ||
set_var("--color-primary__h", "39"); | set_var("--color-primary__h", "39"); | ||
Line 30: | Line 30: | ||
set_var("--color-base--subtle", "hsl(var(--color-primary__h),var(--color-primary__s),calc(var(--color-primary__l) * 0.5))"); | set_var("--color-base--subtle", "hsl(var(--color-primary__h),var(--color-primary__s),calc(var(--color-primary__l) * 0.5))"); | ||
} | } | ||
function refreshPage() | |||
{ | |||
location.reload(); | |||
return false; | |||
} | |||
function attachRefresh() | |||
{ | |||
$('#citizen-pref-theme-option-auto').attr('onClick', 'refreshPage();'); | |||
$('#citizen-pref-theme-option-dark').attr('onClick', 'refreshPage();'); | |||
$('#citizen-pref-theme-option-light').attr('onClick', 'refreshPage();'); | |||
} | |||
function attachRefreshDelay() | |||
{ | |||
setTimeout(attachRefresh, 10); | |||
} | |||
setTimeout(function () {$('#citizen-pref-toggle').attr('onClick', 'attachRefreshDelay();');}, 200); |