diff --git a/package.json b/package.json index b094f01..ae8542f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salet", - "version": "1.7.4", + "version": "1.7.5", "description": "A general client-side framework for cybertext interactive fiction games.", "keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"], "homepage": "https://salet.su", diff --git a/src/room.coffee b/src/room.coffee index e0a8f8d..cf1e419 100644 --- a/src/room.coffee +++ b/src/room.coffee @@ -77,9 +77,6 @@ class SaletRoom if salet.rooms[f].exit? salet.rooms[f].exit @name - if window.history.pushState? - window.history.pushState(@name, @title) - if @enter @enter f diff --git a/src/salet.coffee b/src/salet.coffee index ba78d5d..dabc85a 100644 --- a/src/salet.coffee +++ b/src/salet.coffee @@ -305,13 +305,10 @@ class Salet # Go back N rooms. It's not an UNDO. # Also, steps = 1 is the current room @goBack = (steps = 2) -> - window.history.back() - if @progress.path.length <= 1 + if @progress.path.length <= steps location = @start - else if @progress.path.length > steps - location = @progress.path[@progress.path.length - steps] else - return @goBack(steps - 1) + location = @progress.path[@progress.path.length - steps] if location? @processClick(location)