How do I cheat super mario html 5 to give me infinite lives and fire flowers?

I have been playing the emulation of Super Mario in Firefox, and I was trying to find out how to give me infinite lives or fireflowers. I have a very lightweight computer and I don't want to download anything, so is there a way to use dev console or edit the html? I am not good with coding but would like to do this.


Press F12

in the console type : data and press enter. You'll see most of the variables there.

For the number of lives for instance, type : data.lives.amount = 99 then when you lose or gain a life your screen will get updated and you'll have those 99 (+-1) lives


You can edit your character and environment variables using the console by pressing F12. Type your desired cheat code into the console and press Enter.

Here are the functions you have asked about:

Infinite lives (technically a high number):
setLives(999);

or make yourself Invincible:
mario.star = true

Fire Flowers:
marioShroom(mario)

Kill all characters except Mario:
killOtherCharacters()