diff --git a/4chan_x.user.js b/4chan_x.user.js index ae9938748..2b8256a09 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -106,8 +106,7 @@ '404 Redirect': [true, 'Redirect dead threads'], 'Anonymize': [false, 'Make everybody anonymous'], 'Keybinds': [false, 'Binds actions to keys'], - 'Localize Time': [true, 'Show times based on your timezone'], - 'Localized am/pm': [false, 'Change localized time to the 12-hour clock convention'], + 'Time Formatting': [false, 'Arbitrarily formatted timestamps, using your local time'], 'Report Button': [true, 'Add report buttons'], 'Comment Expansion': [true, 'Expand too long comments'], 'Thread Expansion': [true, 'View all replies'], @@ -1668,6 +1667,15 @@ } } }; + ({ + time: function() { + return { + init: function() { + return g.callbacks.push(function(root) {}); + } + }; + } + }); localize = { init: function() { return g.callbacks.push(function(root) { @@ -2433,8 +2441,8 @@ if ($.config('Image Auto-Gif')) { imgGif.init(); } - if ($.config('Localize Time')) { - localize.init(); + if ($.config('Time Formatting')) { + time.init(); } if ($.config('Sauce')) { sauce.init(); diff --git a/script.coffee b/script.coffee index 6f09ef652..2f4f84208 100644 --- a/script.coffee +++ b/script.coffee @@ -38,8 +38,7 @@ config = '404 Redirect': [true, 'Redirect dead threads'] 'Anonymize': [false, 'Make everybody anonymous'] 'Keybinds': [false, 'Binds actions to keys'] - 'Localize Time': [true, 'Show times based on your timezone'] - 'Localized am/pm': [false, 'Change localized time to the 12-hour clock convention'] + 'Time Formatting': [false, 'Arbitrarily formatted timestamps, using your local time'] 'Report Button': [true, 'Add report buttons'] 'Comment Expansion': [true, 'Expand too long comments'] 'Thread Expansion': [true, 'View all replies'] @@ -1314,6 +1313,11 @@ sauce = href: prefix + suffix $.append span, $.tn(' '), link +time: -> + init: -> + g.callbacks.push (root) -> + return + localize = init: -> g.callbacks.push (root) -> @@ -1833,8 +1837,8 @@ main = if $.config 'Image Auto-Gif' imgGif.init() - if $.config 'Localize Time' - localize.init() + if $.config 'Time Formatting' + time.init() if $.config 'Sauce' sauce.init()