From 7b3301ab8d595d10f91ee42489a9e9078fad8147 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 8 Jun 2011 09:52:29 -0700 Subject: [PATCH] %I --- 4chan_x.user.js | 5 ++++- script.coffee | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 6b31f3f87..edd700e2e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -958,7 +958,7 @@ var arr, checked, description, dialog, hiddenNum, hiddenThreads, html, input, key, li, main, obj, ul, _i, _len, _ref, _ref2; hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {}); hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length; - html = "
Options X


Sauce flavors
Time Formatting
Donate
support throd | github | uso
"; + html = "
Options X


Sauce flavors
Time Formatting
Donate
support throd | github | uso
"; dialog = ui.dialog('options', { top: '25%', left: '25%' @@ -1732,6 +1732,9 @@ H: function() { return this.zeroPad(this.date.getHours()); }, + I: function() { + return this.zeroPad(this.date.getHours() % 12 || 12); + }, m: function() { return this.zeroPad(this.date.getMonth() + 1); }, diff --git a/script.coffee b/script.coffee index b38c7e4f6..6adfb66d6 100644 --- a/script.coffee +++ b/script.coffee @@ -746,6 +746,7 @@ options = %aweekday, abbreviatedFri %dday of the month (dd), zero padded03 %Hhour (24 hour clock) zero padded13 + %Ihour (12 hour clock) zero padded02 %mmm month06 %MMM minutes54 %pupper case AM or PMPM @@ -1373,6 +1374,7 @@ time = ][@date.getDay()] d: -> @zeroPad @date.getDate() H: -> @zeroPad @date.getHours() + I: -> @zeroPad @date.getHours() % 12 or 12 m: -> @zeroPad @date.getMonth() + 1 M: -> @zeroPad @date.getMinutes() p: -> if @date.getHours() < 12 then 'AM' else 'PM'