0 votes
by (2.9k points)
Hi, I was wondering if there was a way to get rid of the menu buttons in sugarcane mainly the restart button.

If anyone knows how to do so please comment with the answer.

1 Answer

+1 vote
by (159k points)
edited by

note: For the reasons I stated in this comment in the Adding border around a text section in a passage question I strongly suggest not using the Sugarcane story format.

If you use the Developer Tools built into your web-browser to Inspect (1) the HTML generated by that area of the side-bar you will see it looks something like the following:

<ul id="sidebar">
	<li id="title" class="storyElement">
		<span id="storyTitle" class="storyElement">Untitled Story</span>
		<span id="storySubtitle" class="storyElement"></span>
		<span id="titleSeparator"><br></span>
		<span id="storyAuthor" class="storyElement">Anonymous</span>
	<li id="storyMenu" class="storyElement" style="display:none"></li>
	<li><a href="javascript:;" id="restart">Restart</a></li>
	<li><a id="bookmark" title="Permanent link to this passage" href="#.0">Bookmark</a></li>
	<li id="credits">
		This story was created with <a href="http://twinery.org/">Twine</a> and is powered by <a href="http://tiddlywiki.com/">TiddlyWiki</a>

You can use the details of the above HTML structure to create CSS rules within a Stylesheet type passage to hide the elements you don't want to appear.

eg. The Restart link has an ID of restart and you can use the following CSS Selector to target it and it's display property to cause it not to appear.

#restart {
	display: none;

(1). If you're using Windows then one way to do this is to place your mouse curse over the area you wish to Inspect and then use your right mouse button to open the context menu. Select the Inspect (or similar named) menu item to open the Elements panel of your web-browser's Development Tools.