MV SumRndmDde's Fullscreen Toggle Problem [solved]

The fullscreen toggle option plugin was discussed here.

It does what I want, but the "on/off" designation seems to get messed up very easily. It doesn't change from ON to OFF or vice versa the first time I press the button.

I turned off all other plugins and the problem persists.

I started a new project using only this plugin, and it has the same problem.

Images below for what I see.

Spoiler
fullscreentoggle1.jpg

fullscreentoggle2.jpg

fullscreentoggle3.jpg

Edit: Looks like someone found a fix for this issue after all, discussed in the comments here.

Add the code found here to the end of the plugin, but before the very last part of the code here.

My understanding is that
Code:
})();
needs to be the last line of the plugin.

This worked for me.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/sumrndmddes-fullscreen-toggle-problem-solved.149511/