Get rid of UNDO and REDO button

Hi all,

I want to get rid of the ‘UNDO’ and ‘REDO’ in the sidebar. I googled and found a solution but it is not working (or I’m doing it wrong). The solution I tried was to put the below code in the stylesheet:

tw-icon.undo {
display: none;
tw-icon.redo {
display: none;

What am I doing wrong here?

I use Twine Version: 2.3.9
Story Format: SugarCube 2.31.1

Method 1: In “Edit Story Javascript” section (from lower left menu), put this in:

Config.history.controls = false;

Method 2: In Edit Story Stylesheet, put this in:

#ui-bar-history {
  display: none;

There might be other ways, but choose whichever makes more sense to you.

1 Like

That works. Thank you. :+1:

1 Like

If you’re not using the game history at all, then merely hiding the controls, as brushmen suggested, won’t prevent the game from storing the history information.

What you should do instead is add this to your JavaScript section:

Config.history.maxStates = 1;

When the Config.history.maxStates setting is set to 1, then it not only hides the history navigation buttons, but it also keeps the game from storing any history information beyond the current “moment” in the game. This means that save files will be small, and passage transition and save-file load times will be faster.

Enjoy! :grinning:

1 Like

Thanks for the help @HiEv

hey you seem well versed in this. I am using twine 2 and harlowe 3.2.2 and I can’t for the life of me figure out how to get rid of the undo button. I have tried about 5 different methods, including this one. help please

Ideally you shouldn’t ask question about one Story Format in a thread dedicated to another, as each format is unique.

The Harlowe related UI Sidebar thread on this forum contains the answer to your question.

1 Like