How to add HTML to every page?

0 votes
asked Dec 5 by Charlie (4,510 points)

Greetings Twinemasters,

My game is not displaying properly on mobile devices, but I think I can fix it by adding this HTML tag to each page:

<meta name="viewport" content="width=device-width*1.4,initial-scale=1, user-scalable=yes"/>
 

However...I can't figure out how to do that.  Can anybody help?

1 Answer

+1 vote
answered Dec 5 by greyelf (43,790 points)
selected Dec 5 by Charlie
 
Best answer

notes: The SugarCube 2 story format already includes a viewport related meta element within the head secion of it's template. I won't comment on if the settings in your example meta element will meet your needs or not because I can't test them.

One way you can do what you want is to:
1. Generate your story HTML file via the Publish to File option.
2. Open your story HTML file within a Text Editor of your choice.
3. Locate the existing viewport related meta element, it should be the sixth line of the HTML file.
4. Edit the content property of the existing element until it meets your needs.
5. Save the modified HTML file.

commented Dec 5 by Charlie (4,510 points)
Perfect, thank you Greyelf!
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...