diff --git a/ikrpg.appcache b/ikrpg.appcache index 62af937..84cfc6b 100644 --- a/ikrpg.appcache +++ b/ikrpg.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# 2016-03-12 +# 2016-04-10 CACHE: diff --git a/static/javascripts/generator.js b/static/javascripts/generator.js index 7f27aaf..aa66f77 100644 --- a/static/javascripts/generator.js +++ b/static/javascripts/generator.js @@ -1515,10 +1515,31 @@ var ikrpg = ikrpg || {}; var spdMod = parseInt($(".character-sheet #wornarmor1 .spd").val()) || 0; $(".character-sheet #spd").val(computedSpd - spdMod); - }) + }); })(); + // ### Update computed SPD (on load) ### \\ HACK! + (function() { + + setTimeout(function() { + $("#characters > tbody > tr > td:nth-of-type(5) > a").click(function(event) { + event.preventDefault(); + + var a = $(event.target); + var tr = a.parent().parent(); + var name = tr.find("td:nth-of-type(1)").text(); + + ikrpg.sheet.showCharacter(name); + + setTimeout(function() { // HACK! (problem seems to be that pouch db is async loading) + var spd = $(".character-sheet #spd").val() || 0; + $(".character-sheet #computed-spd").val(spd); + }, 500); + }); + }, 500); + })(); + })(); // ## Ability changes ## \\