text: $(document).ready(function(){function t(){data={},this.save=function(){return localStorage.setItem(TASK_DATA_PARAM,JSON.stringify(data)),this},this.load=function(){return raw=localStorage.getItem(TASK_DATA_PARAM),raw&&(data=JSON.parse(raw),console.log("Loaded state: "+raw)),this},this.get=function(t){return t in data&&data[t]},this.set=function(t,a){return data[t]=a,this.save(),this}}function a(){$(".task").each(function(){var t=parseInt($(this).attr("id"));$(this).find("input").prop("checked",state.get(t)),state.get(t)?$(this).addClass("inactive"):$(this).removeClass("inactive")})}function n(t){return $('.task[id="'+t+'"]')}TASK_DATA_PARAM="cs70inboxtasks",$("input").on("change",function(){var t=parseInt($(this).attr("no"));state.set(t,$(this).prop("checked")),n(t).toggleClass("inactive")}),$(".task .text").on("click",function(){$(this).parent().find("input").click()}),state=(new t).load(),a()});