Merge branch 'master' into v3
This commit is contained in:
commit
7460bc1c0f
@ -487,6 +487,15 @@
|
||||
$.add(d.head, script);
|
||||
return $.rm(script);
|
||||
},
|
||||
shortenFilename: function(filename, isOP) {
|
||||
var threshold;
|
||||
threshold = 30 + 10 * isOP;
|
||||
if (filename.replace(/\.\w+$/, '').length > threshold) {
|
||||
return "" + filename.slice(0, threshold - 5) + "(...)" + (filename.match(/\.\w+$/));
|
||||
} else {
|
||||
return filename;
|
||||
}
|
||||
},
|
||||
bytesToString: function(size) {
|
||||
var unit;
|
||||
unit = 0;
|
||||
|
||||
19
changelog
19
changelog
@ -2,6 +2,25 @@ alpha
|
||||
- Mayhem
|
||||
Fix Chrome's install warning that 4chan X would execute on all domains.
|
||||
|
||||
2.34.7
|
||||
- Mayhem
|
||||
Fix one-word-captcha, you'll need to leave a space for the fake word now.
|
||||
|
||||
2.34.6
|
||||
- Mayhem
|
||||
Fix error caused by change in 4chan's HTML about hidden filename in case of spoiler.
|
||||
|
||||
2.34.5
|
||||
- Mayhem
|
||||
Fix cooldown on /q/.
|
||||
Fix thread creation with no file on /q/.
|
||||
Fix 'Administrator/Moderator/Developer Replies' creating extra backlinks on /q/.
|
||||
Add /mlp/ archive redirection.
|
||||
|
||||
2.34.4
|
||||
- Mayhem
|
||||
Add /q/ archive redirection.
|
||||
|
||||
2.34.3
|
||||
- Mayhem
|
||||
Update /k/ archive redirection.
|
||||
|
||||
@ -1 +1 @@
|
||||
postMessage({version:'2.34.3'},'*')
|
||||
postMessage({version:'2.34.7'},'*')
|
||||
@ -372,6 +372,15 @@ $.extend $,
|
||||
script = $.el 'script', textContent: code
|
||||
$.add d.head, script
|
||||
$.rm script
|
||||
shortenFilename: (filename, isOP) ->
|
||||
# FILENAME SHORTENING SCIENCE:
|
||||
# OPs have a +10 characters threshold.
|
||||
# The file extension is not taken into account.
|
||||
threshold = 30 + 10 * isOP
|
||||
if filename.replace(/\.\w+$/, '').length > threshold
|
||||
"#{filename[...threshold - 5]}(...)#{filename.match(/\.\w+$/)}"
|
||||
else
|
||||
filename
|
||||
bytesToString: (size) ->
|
||||
unit = 0 # Bytes
|
||||
while size >= 1024
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user