Skip to content

Instantly share code, notes, and snippets.

@dariusk
Last active December 11, 2015 18:39
Show Gist options
  • Save dariusk/4643450 to your computer and use it in GitHub Desktop.
Save dariusk/4643450 to your computer and use it in GitHub Desktop.
Modifies the Jonah theme so that it can be used as a presentation (like if you want to display it on a projector).

Twine Presentation (Projector) Mode

Modifies the Jonah theme so that it can be used as a presentation (like if you want to display it on a projector). In addition to making the text bigger and playing with the content width, this also maps the left arrow key to move backwards in your presentation. (Forward arrow doesn't make sense because you might have a branching presentation.)

Installation instructions

  • Make sure you're using the Jonah theme (Story -> Story Format -> Jonah)
  • Place the contents of "script.js" in a passage tagged "script"
  • Place the contents of "stylesheet.css" in a passage tagged "stylesheet"
History.prototype.originalDisplay = History.prototype.display;
History.prototype.display = function (title, link, render)
{
if ((render != 'quietly') && (render != 'offscreen')) {
removeChildren($('passages'));
}
this.originalDisplay.apply(this, arguments);
};
function goBack() {
var backtitle=state.history[1].passage.title;
state.history.splice(0,2);
state.display(backtitle);
};
document.onkeydown = function checkKey(e) {
e = e || window.event;
if(e.keyCode=='37') {
goBack();
}
}
#content2 {
max-width: 600px;
}
#storyTitle {
display: none;
}
#passages {
font-size: 2em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment