morepurplemorebetter / MPMBs-Character-Record-Sheet

MorePurpleMoreBetter's D&D 5e Character Record Sheet
https://www.flapkan.com
GNU General Public License v3.0
372 stars 352 forks source link

REQUEST: Option to suppress Javascript window toolbar on startup #40

Closed aga9 closed 6 years ago

aga9 commented 6 years ago

As title: an option to NOT pop out the Javascript Window toolbar by default.

The toolbar is only useful for the initial setup of the page, and occasionally thereafter. It's a bit of a nuisance to have to click it away every time.

morepurplemorebetter commented 6 years ago

This is not so easy to implement, as it would require some kind of setting to be remembered by the sheet, which requires a field addition and a dedicated menu for it.

Because I feel this is not an essential feature, I'll put it up for a vote on my Patreon when next opportunity arises for adding a 'minor feature'. If voted for, I'll implement it. For now, I'm closing this request.

In the meantime, you can add some custom code to modify the startup function to never make the toolbar:

if (MakeButtons.toString().indexOf("function ()") === -1) {
    eval(MakeButtons.toString().replace("function MakeButtons() {", "MakeButtons = function() { if(!event.target.name) return;"));
};

Just import the above code as a custom script :)