richtr / NoSleep.js

Prevent display sleep and enable wake lock in any Android or iOS web browser.
MIT License
2.19k stars 379 forks source link

Make console.log and console.warn instructions optional #129

Open BrightSoul opened 2 years ago

BrightSoul commented 2 years ago

Hi and thanks very much for this library! I'd like to exclude the console.log and console.warn instructions since they're polluting the console with messages. https://github.com/richtr/NoSleep.js/blob/1d15cc88dd8c1b62fe5b5f910c6ff7396b280d68/src/index.js#L80

A configuration option would be enough:

const noSleep = new NoSleep({ silent: true });

Do you accept pull requests?