Add beef.client.debug config property - Part of issue #862

Client-side debugging is disabled by default

`beef.debug()` now only shows messages if `beef.client.debug` is true
This commit is contained in:
bcoles
2013-04-17 22:05:31 +09:30
parent 6e0f7a266e
commit 4980ca02a6
3 changed files with 14 additions and 8 deletions

View File

@@ -37,6 +37,7 @@ if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
* @param: {string} the debug string to return
*/
debug: function(msg) {
if (!<%= @client_debug %>) return;
if (typeof console == "object" && typeof console.log == "function") {
console.log(msg);
} else {