Changing Css or using eval

Forgewright
29 Jan 2019, 19:31

When I use:

JS.setCss (".ui-icon", "display:none")

If you just delete a line of code from the init script does quest core code return to original when saved or reloaded?
Should I replace it with correct code then delete it?
Does this permanently change Quest?
Who am I?
Where's Waldo?


mrangel
29 Jan 2019, 22:13

When you use the JS code, it changes the CSS rules for the lifetime of the browser session (as long as the game is actively being played; so it reverts when the game is closed and reloaded)

If you put that code in the UI initialisation script, it applies the change when a new game is started, and when a saved game is loaded. That's necessary because the state of the browser isn't included in the saved game.

It doesn't permanently change anything. It only changes a variable which is stored in-memory, and is not saved with the rest of the game.