time -> Time

This commit is contained in:
James Campos 2011-06-14 19:36:38 -07:00
parent 17976954d8
commit ee53a002b7
2 changed files with 19 additions and 19 deletions

View File

@ -59,7 +59,7 @@
*/ */
(function() { (function() {
var $, $$, Favicon, NAMESPACE, Recaptcha, anonymize, config, cooldown, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, log, main, nav, nodeInserted, options, qr, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, sauce, threadHiding, threadStats, threading, time, titlePost, ui, unread, updater, watcher, _config, _ref; var $, $$, Favicon, NAMESPACE, Recaptcha, Time, anonymize, config, cooldown, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, log, main, nav, nodeInserted, options, qr, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, sauce, threadHiding, threadStats, threading, titlePost, ui, unread, updater, watcher, _config, _ref;
var __slice = Array.prototype.slice; var __slice = Array.prototype.slice;
if (typeof console !== "undefined" && console !== null) { if (typeof console !== "undefined" && console !== null) {
log = function(arg) { log = function(arg) {
@ -1040,9 +1040,9 @@
}, },
time: function(e) { time: function(e) {
$.setValue('time', this.value); $.setValue('time', this.value);
time.foo(); Time.foo();
time.date = new Date(); Time.date = new Date();
return $('#timePreview').textContent = time.funk(time); return $('#timePreview').textContent = Time.funk(Time);
} }
} }
}; };
@ -1696,9 +1696,9 @@
} }
} }
}; };
time = { Time = {
init: function() { init: function() {
time.foo(); Time.foo();
return g.callbacks.push(function(root) { return g.callbacks.push(function(root) {
var day, hour, min, month, s, timeEl, year, _, _ref; var day, hour, min, month, s, timeEl, year, _, _ref;
if (root.className === 'inline') { if (root.className === 'inline') {
@ -1709,9 +1709,9 @@
year = "20" + year; year = "20" + year;
month -= 1; month -= 1;
hour = g.chanOffset + Number(hour); hour = g.chanOffset + Number(hour);
time.date = new Date(year, month, day, hour, min); Time.date = new Date(year, month, day, hour, min);
timeEl = $.el('time', { timeEl = $.el('time', {
textContent: ' ' + time.funk(time) + ' ' textContent: ' ' + Time.funk(Time) + ' '
}); });
return $.replace(s, timeEl); return $.replace(s, timeEl);
}); });
@ -1738,7 +1738,7 @@
return s; return s;
} }
}); });
return time.funk = Function('time', "return '" + code + "'"); return Time.funk = Function('time', "return '" + code + "'");
}, },
day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
@ -2527,7 +2527,7 @@
imgGif.init(); imgGif.init();
} }
if ($.config('Time Formatting')) { if ($.config('Time Formatting')) {
time.init(); Time.init();
} }
if ($.config('Sauce')) { if ($.config('Sauce')) {
sauce.init(); sauce.init();

View File

@ -820,9 +820,9 @@ options =
g.hiddenReplies = {} g.hiddenReplies = {}
time: (e) -> time: (e) ->
$.setValue 'time', @value $.setValue 'time', @value
time.foo() Time.foo()
time.date = new Date() Time.date = new Date()
$('#timePreview').textContent = time.funk time $('#timePreview').textContent = Time.funk Time
cooldown = cooldown =
init: -> init: ->
@ -1362,9 +1362,9 @@ sauce =
href: prefix + suffix href: prefix + suffix
$.append span, $.tn(' '), link $.append span, $.tn(' '), link
time = Time =
init: -> init: ->
time.foo() Time.foo()
g.callbacks.push (root) -> g.callbacks.push (root) ->
return if root.className is 'inline' return if root.className is 'inline'
s = $('span[id^=no]', root).previousSibling s = $('span[id^=no]', root).previousSibling
@ -1373,11 +1373,11 @@ time =
year = "20#{year}" year = "20#{year}"
month -= 1 #months start at 0 month -= 1 #months start at 0
hour = g.chanOffset + Number hour hour = g.chanOffset + Number hour
time.date = new Date year, month, day, hour, min Time.date = new Date year, month, day, hour, min
#XXX /b/ will have seconds cut off #XXX /b/ will have seconds cut off
timeEl = $.el 'time', timeEl = $.el 'time',
textContent: ' ' + time.funk(time) + ' ' textContent: ' ' + Time.funk(Time) + ' '
$.replace s, timeEl $.replace s, timeEl
foo: -> foo: ->
@ -1385,7 +1385,7 @@ time =
switch c switch c
when 'a', 'A', 'b', 'B', 'd', 'H', 'I', 'm', 'M', 'p', 'P', 'y' then "' + time.#{c}() + '" when 'a', 'A', 'b', 'B', 'd', 'H', 'I', 'm', 'M', 'p', 'P', 'y' then "' + time.#{c}() + '"
else s else s
time.funk = Function 'time', "return '#{code}'" Time.funk = Function 'time', "return '#{code}'"
day: [ day: [
'Sunday' 'Sunday'
'Monday' 'Monday'
@ -1909,7 +1909,7 @@ main =
imgGif.init() imgGif.init()
if $.config 'Time Formatting' if $.config 'Time Formatting'
time.init() Time.init()
if $.config 'Sauce' if $.config 'Sauce'
sauce.init() sauce.init()