Revision of Twine: eliminate the back button functionality in Sugarcane from Mon, 02/25/2013 - 23:56

If you want to remove the back button functionality in Sugarcane, here is some script code that can do that:

History.prototype.save=function(c){var a="";for(var b=this.history.length-1;b>=0;
b--){if((this.history[b].passage)&&(this.history[b].passage.id)){a+=this.history[b].passage.id.toString(36)+".";
}}this.history[0].hash="#"+a.substr(0,a.length-1);return"";};

This will prevent previous passages appearing in the player's browser history, save for the Start passage, and any passages revisited using the Rewind menu.

pensive-mosquitoes