How to add a feedback button to the ui-bar in sugarcube

Twine Version: 2.9

How can I add a feedback button in the ui-bar, under “saves” and “restart” buttons. This button would link to a google form so users could give me feedback.

I’m trying this in story js but not working:

$(document).one(":passagedisplay", function () {
    var feedbackButton = $('<button/>', {
        text: 'Feedback', 
        click: function () {
            window.open('https://link here...', '_blank'); 
        }
    });
    $('#ui-bar').append(feedbackButton);
});

Hiya!

The easiest is to:

  • hide the menu element with the built-in buttons
  • add all these links to the StoryMenu passage

in your CSS:

#menu-core {
  display: none;
}

and in your StoryMenu passage:

[[Some Links]]
<<link "Saves">><<run UI.saves()>><</link>>
<<link "Settings">><<run UI.settings()>><</link>>
<<link "Restart">><<run UI.restart()>><</link>>
[[Feedback|URL]]