X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1fc8724242d7f5bbba51812a118d86aead57f32b..f02d58db2f0a5f06c38d669c4b4c4fff95e55395:/project/static/js/jquery.logging.js diff --git a/project/static/js/jquery.logging.js b/project/static/js/jquery.logging.js index 9a7fbe02..0f0df519 100644 --- a/project/static/js/jquery.logging.js +++ b/project/static/js/jquery.logging.js @@ -6,11 +6,17 @@ const LOG_LEVEL = LEVEL_DEBUG; var mozillaLog = function() { - if (window.console) console.log.apply(this, arguments); + if (window.console) + console.log.apply(this, arguments); }; + var safariLog = function() { + if (window.console) + console.log.apply(console, arguments); + }; + var operaLog = function() { - opera.postError.(arguments.join(' ')); + opera.postError(arguments.join(' ')); }; var defaultLog = function() { return false; }; @@ -19,10 +25,12 @@ return $.log.browserLog.apply(this, arguments); }; - if ($.browser.mozilla || $.browser.safari) + if ($.browser.mozilla) $.log.browserLog = mozillaLog; + else if ($.browser.safari) + $.log.browserLog = safariLog; else if($.browser.opera) - $.log.browserLog = operaLog + $.log.browserLog = operaLog; else $.log.browserLog = defaultLog;