From 393eb3ec2289293dd4d4caaef17db33bb695fa30 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 30 Mar 2014 16:53:08 -0700 Subject: [PATCH] Lets pretend we're smarter than we really are! --- LICENSE | 2 +- builds/4chan-X.user.js | 8 ++++---- builds/crx/script.js | 8 ++++---- src/Miscellaneous/Time.coffee | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/LICENSE b/LICENSE index 5d11769f7..d59212551 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.4.1 - 2014-03-27 +* 4chan X - Version 1.4.1 - 2014-03-30 * * Licensed under the MIT license. * https://github.com/Spittie/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 159521d67..2e88dfa75 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.4.1 - 2014-03-27 +* 4chan X - Version 1.4.1 - 2014-03-30 * * Licensed under the MIT license. * https://github.com/Spittie/4chan-x/blob/master/LICENSE @@ -12408,18 +12408,18 @@ if (this.isClone) { return; } - return this.nodes.date.textContent = Time.funk(Time, this.info.date); + return this.nodes.date.textContent = Time.funk(this.info.date); }, createFunc: function(format) { var code; code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { - return "' + Time.formatters." + c + ".call(date) + '"; + return "' + this.formatters." + c + ".call(date) + '"; } else { return s; } }); - return Function('Time', 'date', "return '" + code + "'"); + return Function('date', "return '" + code + "'"); }, day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], diff --git a/builds/crx/script.js b/builds/crx/script.js index cf9420347..9ad18c9e4 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.4.1 - 2014-03-27 +* 4chan X - Version 1.4.1 - 2014-03-30 * * Licensed under the MIT license. * https://github.com/Spittie/4chan-x/blob/master/LICENSE @@ -12424,18 +12424,18 @@ if (this.isClone) { return; } - return this.nodes.date.textContent = Time.funk(Time, this.info.date); + return this.nodes.date.textContent = Time.funk(this.info.date); }, createFunc: function(format) { var code; code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { - return "' + Time.formatters." + c + ".call(date) + '"; + return "' + this.formatters." + c + ".call(date) + '"; } else { return s; } }); - return Function('Time', 'date', "return '" + code + "'"); + return Function('date', "return '" + code + "'"); }, day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], diff --git a/src/Miscellaneous/Time.coffee b/src/Miscellaneous/Time.coffee index 0d290cc63..0f08befa2 100755 --- a/src/Miscellaneous/Time.coffee +++ b/src/Miscellaneous/Time.coffee @@ -8,14 +8,14 @@ Time = cb: @node node: -> return if @isClone - @nodes.date.textContent = Time.funk Time, @info.date + @nodes.date.textContent = Time.funk @info.date createFunc: (format) -> code = format.replace /%([A-Za-z])/g, (s, c) -> if c of Time.formatters - "' + Time.formatters.#{c}.call(date) + '" + "' + this.formatters.#{c}.call(date) + '" else s - Function 'Time', 'date', "return '#{code}'" + Function 'date', "return '#{code}'" day: [ 'Sunday' 'Monday'