diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,8 +1,11 @@ "use strict" -// TODO: battle dialog popup for rolling and assigning hits! // TODO: show killed leaders taken for bonus purchase +function check_menu(id, x) { + document.getElementById(id).className = x ? "menu_item checked" : "menu_item unchecked" +} + const ICONS = { B0: '<span class="black d0"></span>', B1: '<span class="black d1"></span>', @@ -1717,5 +1720,21 @@ function on_blur_tip() { ui.card_tip.className = "hide" } +let tint = window.localStorage[params.title_id + "/tint"] +if (tint === undefined) + tint = 1 + +set_tint(tint) + +function set_tint(x) { + window.localStorage[params.title_id + "/tint"] = tint = x + check_menu("tint", !!tint) + ui.body.classList.toggle("tint", !!tint) +} + +function toggle_tint() { + set_tint(!tint) +} + on_init() scroll_with_middle_mouse("main") |