app/js/controllers.show.js in storys-0.0.5 vs app/js/controllers.show.js in storys-0.0.6

- old
+ new

@@ -14,14 +14,20 @@ iframe.remove(); }); iframe.attr("src", url); } + function setVisited(key) { + if(!localStorage["visited." + key]) localStorage["visited." + key] = "0"; + localStorage["visited." + key] = parseInt(localStorage["visited." + key]) + 1; + } + this.init = function() { console.log("starting show"); $("#view-show").show().addClass("current-view"); loadStory(story.url); + setVisited(story.key); } this.render = function() { } @@ -30,5 +36,7 @@ $("#story").empty(); $("#view-show").hide().removeClass("current-view"); } } +controllers.show.setup = function() { +};