Added an option for console logging errors rather than having annoying a... #173

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Added console option to warnings rather than having the obtrusive JS alerts.

@ghost
Contributor

ghost commented Aug 21, 2013

Thanks. I'll probably add this one in due course... I'll change the string code parts only once, not duplicated, and also check the console.log exists to stop it breaking the legacy browsers... Either making the console.log and empty function or just adding the check to the logic since it is only 2 clauses.

Cheers.

@ghost
Contributor

ghost commented Oct 30, 2013

Been busy, but have finally got round to looking at this...
I think I'll add the logic to the _alert() method and then that will be the only method that changes. Plus it should save some bytes... And I'll put the option default in, just so it is clear the option exists... Which wastes some bytes again heh, but i like the options all being laid out stating the bleeding obvious.
Cheers.

ghost pushed a commit that referenced this pull request Oct 30, 2013

@ghost
Contributor

ghost commented Oct 30, 2013

Release note:
[dev] New Feature: Added consoleAlerts option (default:true) which forces the alerts generated by errorAlerts and warningAlerts to be written to the console instead. When the console is not supported and this option is enabled, no alert will occur.

I did it this way so that if the errorAlerts or warningAlerts options are left enabled, the usual benign console logging does not suddenly start causing alerts in older browsers when you leave the consoleAlerts option enabled.

@ghost ghost closed this Oct 30, 2013

Thanks, great work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment