diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index c579e76bb..243ac8b77 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1175,7 +1175,7 @@ Post.prototype.parseQuote = function(quotelink) { var fullID, match; - if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/(res|thread)\/\d+.*\#p(\d+)$/))) { + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/thread\/\d+.*\#p(\d+)$/))) { return; } this.nodes.quotelinks.push(quotelink); @@ -12682,18 +12682,18 @@ if (this.isClone) { return; } - return this.nodes.date.textContent = Time.funk(this.info.date); + return this.nodes.date.textContent = Time.funk(Time, this.info.date); }, createFunc: function(format) { var code; code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { - return "' + this.formatters." + c + ".call(date) + '"; + return "' + Time.formatters." + c + ".call(date) + '"; } else { return s; } }); - return Function('date', "return '" + code + "'"); + return Function('Time', '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 5004d1512..b625e4088 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1231,7 +1231,7 @@ Post.prototype.parseQuote = function(quotelink) { var fullID, match; - if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/(res|thread)\/\d+.*\#p(\d+)$/))) { + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/thread\/\d+.*\#p(\d+)$/))) { return; } this.nodes.quotelinks.push(quotelink); @@ -12697,18 +12697,18 @@ if (this.isClone) { return; } - return this.nodes.date.textContent = Time.funk(this.info.date); + return this.nodes.date.textContent = Time.funk(Time, this.info.date); }, createFunc: function(format) { var code; code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { - return "' + this.formatters." + c + ".call(date) + '"; + return "' + Time.formatters." + c + ".call(date) + '"; } else { return s; } }); - return Function('date', "return '" + code + "'"); + return Function('Time', '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 0f08befa2..0d290cc63 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 @info.date + @nodes.date.textContent = Time.funk Time, @info.date createFunc: (format) -> code = format.replace /%([A-Za-z])/g, (s, c) -> if c of Time.formatters - "' + this.formatters.#{c}.call(date) + '" + "' + Time.formatters.#{c}.call(date) + '" else s - Function 'date', "return '#{code}'" + Function 'Time', 'date', "return '#{code}'" day: [ 'Sunday' 'Monday'