Fixed logging in FF. Scrolling should now magicly work.
[redakcja.git] / project / static / js / jquery.logging.js
1 (function($) {
2         const LEVEL_DEBUG = 1;
3         const LEVEL_INFO = 2;
4         const LEVEL_WARN = 3;
5
6         const LOG_LEVEL = LEVEL_DEBUG;
7
8         var mozillaLog = function() {
9                 if (window.console)
10                     console.log.apply(this, arguments);
11         };
12
13     var safariLog = function() {
14         if (window.console)
15             console.log.apply(console, arguments);
16     };
17     
18         var operaLog = function() {
19                 opera.postError(arguments.join(' '));
20         };
21
22         var defaultLog = function() { return false; };
23
24         $.log = function( ) {
25                 return $.log.browserLog.apply(this, arguments);
26         };
27
28         if ($.browser.mozilla)
29                 $.log.browserLog = mozillaLog;
30         else if ($.browser.safari)
31             $.log.browserLog = safariLog;
32         else if($.browser.opera)
33                 $.log.browserLog = operaLog;
34         else 
35                 $.log.browserLog = defaultLog;
36
37
38 })(jQuery);