Lets pretend we're smarter than we really are!
This commit is contained in:
parent
af9e544141
commit
393eb3ec22
2
LICENSE
2
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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.4.1 - 2014-03-27
|
* 4chan X - Version 1.4.1 - 2014-03-30
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
@ -12408,18 +12408,18 @@
|
|||||||
if (this.isClone) {
|
if (this.isClone) {
|
||||||
return;
|
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) {
|
createFunc: function(format) {
|
||||||
var code;
|
var code;
|
||||||
code = format.replace(/%([A-Za-z])/g, function(s, c) {
|
code = format.replace(/%([A-Za-z])/g, function(s, c) {
|
||||||
if (c in Time.formatters) {
|
if (c in Time.formatters) {
|
||||||
return "' + Time.formatters." + c + ".call(date) + '";
|
return "' + this.formatters." + c + ".call(date) + '";
|
||||||
} else {
|
} else {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Function('Time', 'date', "return '" + code + "'");
|
return Function('date', "return '" + code + "'");
|
||||||
},
|
},
|
||||||
day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||||
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// 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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
@ -12424,18 +12424,18 @@
|
|||||||
if (this.isClone) {
|
if (this.isClone) {
|
||||||
return;
|
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) {
|
createFunc: function(format) {
|
||||||
var code;
|
var code;
|
||||||
code = format.replace(/%([A-Za-z])/g, function(s, c) {
|
code = format.replace(/%([A-Za-z])/g, function(s, c) {
|
||||||
if (c in Time.formatters) {
|
if (c in Time.formatters) {
|
||||||
return "' + Time.formatters." + c + ".call(date) + '";
|
return "' + this.formatters." + c + ".call(date) + '";
|
||||||
} else {
|
} else {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Function('Time', 'date', "return '" + code + "'");
|
return Function('date', "return '" + code + "'");
|
||||||
},
|
},
|
||||||
day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
day: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||||
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||||
|
|||||||
@ -8,14 +8,14 @@ Time =
|
|||||||
cb: @node
|
cb: @node
|
||||||
node: ->
|
node: ->
|
||||||
return if @isClone
|
return if @isClone
|
||||||
@nodes.date.textContent = Time.funk Time, @info.date
|
@nodes.date.textContent = Time.funk @info.date
|
||||||
createFunc: (format) ->
|
createFunc: (format) ->
|
||||||
code = format.replace /%([A-Za-z])/g, (s, c) ->
|
code = format.replace /%([A-Za-z])/g, (s, c) ->
|
||||||
if c of Time.formatters
|
if c of Time.formatters
|
||||||
"' + Time.formatters.#{c}.call(date) + '"
|
"' + this.formatters.#{c}.call(date) + '"
|
||||||
else
|
else
|
||||||
s
|
s
|
||||||
Function 'Time', 'date', "return '#{code}'"
|
Function 'date', "return '#{code}'"
|
||||||
day: [
|
day: [
|
||||||
'Sunday'
|
'Sunday'
|
||||||
'Monday'
|
'Monday'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user