Revert "Lets pretend we're smarter than we really are!"

This reverts commit 393eb3ec2289293dd4d4caaef17db33bb695fa30.

Conflicts:
	LICENSE
	builds/4chan-X.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2014-05-03 16:05:46 -07:00
parent e4efa68044
commit 0faacd737e
3 changed files with 11 additions and 11 deletions

View File

@ -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'],

View File

@ -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'],

View File

@ -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'