console.log.bind

This commit is contained in:
Nicolas Stepien 2011-12-11 21:04:42 +01:00
parent f28964138e
commit e20d07e1be
2 changed files with 3 additions and 11 deletions

View File

@ -64,7 +64,7 @@
*/
(function() {
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, VERSION, anonymize, conf, config, cooldown, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteDR, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, Recaptcha, SECOND, Time, VERSION, anonymize, conf, config, cooldown, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteDR, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher, _base;
var __slice = Array.prototype.slice;
config = {
@ -171,11 +171,7 @@
}
};
if (typeof console !== "undefined" && console !== null) {
log = function(arg) {
return console.log(arg);
};
}
log = typeof (_base = console.log).bind === "function" ? _base.bind(console) : void 0;
if (!Object.keys) {
Object.keys = function(o) {

View File

@ -98,11 +98,7 @@ config =
'Auto Update': [true, 'Automatically fetch new posts']
'Interval': 30
# XXX chrome can't into `{log} = console`
if console?
# XXX scriptish - console.log.apply is not a function
log = (arg) ->
console.log arg
log = console.log.bind? console
# XXX opera cannot into Object.keys
if not Object.keys