Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3
Conflicts: CHANGELOG.md package.json
This commit is contained in:
commit
cadbea75b2
@ -1,4 +1,3 @@
|
||||
|
||||
**MayhemYDG**:
|
||||
- Tiny posting cooldown adjustment:
|
||||
- You can post an image reply immediately after a non-image reply.
|
||||
@ -37,6 +36,8 @@
|
||||
</ul>
|
||||
- Navigating across index pages is now instantaneous.
|
||||
- Added a keybind to open the catalog search field on index pages.
|
||||
- Minor cooldown fix:
|
||||
- You cannot post an image reply immediately after a non-image reply anymore.
|
||||
- Various minor fixes
|
||||
|
||||
### v1.2.43
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-11-23
|
||||
* 4chan X - Version 1.2.43 - 2013-11-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-11-23
|
||||
* 4chan X - Version 1.2.43 - 2013-11-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2663,6 +2663,14 @@
|
||||
return filename;
|
||||
}
|
||||
},
|
||||
thumbRotate: (function() {
|
||||
var n;
|
||||
|
||||
n = 0;
|
||||
return function() {
|
||||
return n = (n + 1) % 3;
|
||||
};
|
||||
})(),
|
||||
postFromObject: function(data, boardID) {
|
||||
var o;
|
||||
|
||||
@ -2693,7 +2701,7 @@
|
||||
width: data.w,
|
||||
MD5: data.md5,
|
||||
size: data.fsize,
|
||||
turl: "//t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
||||
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
||||
theight: data.tn_h,
|
||||
twidth: data.tn_w,
|
||||
isSpoiler: !!data.spoiler,
|
||||
@ -6197,7 +6205,7 @@
|
||||
return QR.cooldown.start();
|
||||
},
|
||||
set: function(data) {
|
||||
var cooldown, delay, hasFile, isReply, post, req, start, threadID, upSpd;
|
||||
var cooldown, delay, isReply, post, req, start, threadID, upSpd;
|
||||
|
||||
if (!Conf['Cooldown']) {
|
||||
return;
|
||||
@ -6209,14 +6217,13 @@
|
||||
delay: delay
|
||||
};
|
||||
} else {
|
||||
if (hasFile = !!post.file) {
|
||||
if (post.file) {
|
||||
upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND);
|
||||
QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2;
|
||||
QR.cooldown.upSpd = upSpd;
|
||||
}
|
||||
cooldown = {
|
||||
isReply: isReply,
|
||||
hasFile: hasFile,
|
||||
threadID: threadID
|
||||
};
|
||||
}
|
||||
@ -6266,17 +6273,7 @@
|
||||
if (elapsed < 0) {
|
||||
continue;
|
||||
}
|
||||
if (!isReply) {
|
||||
type = 'thread';
|
||||
} else if (hasFile) {
|
||||
if (!cooldown.hasFile) {
|
||||
seconds = Math.max(seconds, 0);
|
||||
continue;
|
||||
}
|
||||
type = 'image';
|
||||
} else {
|
||||
type = 'reply';
|
||||
}
|
||||
type = !isReply ? 'thread' : hasFile ? 'image' : 'reply';
|
||||
maxTimer = Math.max(types[type] || 0, types[type + '_intra'] || 0);
|
||||
if (!((start <= now && now <= start + maxTimer * $.SECOND))) {
|
||||
QR.cooldown.unset(start);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-11-23
|
||||
* 4chan X - Version 1.2.43 - 2013-11-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2675,6 +2675,14 @@
|
||||
return filename;
|
||||
}
|
||||
},
|
||||
thumbRotate: (function() {
|
||||
var n;
|
||||
|
||||
n = 0;
|
||||
return function() {
|
||||
return n = (n + 1) % 3;
|
||||
};
|
||||
})(),
|
||||
postFromObject: function(data, boardID) {
|
||||
var o;
|
||||
|
||||
@ -2705,7 +2713,7 @@
|
||||
width: data.w,
|
||||
MD5: data.md5,
|
||||
size: data.fsize,
|
||||
turl: "//t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
||||
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
||||
theight: data.tn_h,
|
||||
twidth: data.tn_w,
|
||||
isSpoiler: !!data.spoiler,
|
||||
@ -6207,7 +6215,7 @@
|
||||
return QR.cooldown.start();
|
||||
},
|
||||
set: function(data) {
|
||||
var cooldown, delay, hasFile, isReply, post, req, start, threadID, upSpd;
|
||||
var cooldown, delay, isReply, post, req, start, threadID, upSpd;
|
||||
|
||||
if (!Conf['Cooldown']) {
|
||||
return;
|
||||
@ -6219,14 +6227,13 @@
|
||||
delay: delay
|
||||
};
|
||||
} else {
|
||||
if (hasFile = !!post.file) {
|
||||
if (post.file) {
|
||||
upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND);
|
||||
QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2;
|
||||
QR.cooldown.upSpd = upSpd;
|
||||
}
|
||||
cooldown = {
|
||||
isReply: isReply,
|
||||
hasFile: hasFile,
|
||||
threadID: threadID
|
||||
};
|
||||
}
|
||||
@ -6276,17 +6283,7 @@
|
||||
if (elapsed < 0) {
|
||||
continue;
|
||||
}
|
||||
if (!isReply) {
|
||||
type = 'thread';
|
||||
} else if (hasFile) {
|
||||
if (!cooldown.hasFile) {
|
||||
seconds = Math.max(seconds, 0);
|
||||
continue;
|
||||
}
|
||||
type = 'image';
|
||||
} else {
|
||||
type = 'reply';
|
||||
}
|
||||
type = !isReply ? 'thread' : hasFile ? 'image' : 'reply';
|
||||
maxTimer = Math.max(types[type] || 0, types[type + '_intra'] || 0);
|
||||
if (!((start <= now && now <= start + maxTimer * $.SECOND))) {
|
||||
QR.cooldown.unset(start);
|
||||
|
||||
@ -9,6 +9,9 @@ Build =
|
||||
"#{filename[...threshold - 5]}(...).#{filename[-3..]}"
|
||||
else
|
||||
filename
|
||||
thumbRotate: do ->
|
||||
n = 0
|
||||
-> n = (n + 1) % 3
|
||||
postFromObject: (data, boardID) ->
|
||||
o =
|
||||
# id
|
||||
@ -43,7 +46,7 @@ Build =
|
||||
width: data.w
|
||||
MD5: data.md5
|
||||
size: data.fsize
|
||||
turl: "//t.4cdn.org/#{boardID}/thumb/#{data.tim}s.jpg"
|
||||
turl: "//#{Build.thumbRotate()}.t.4cdn.org/#{boardID}/thumb/#{data.tim}s.jpg"
|
||||
theight: data.tn_h
|
||||
twidth: data.tn_w
|
||||
isSpoiler: !!data.spoiler
|
||||
|
||||
@ -312,11 +312,11 @@ QR =
|
||||
if delay
|
||||
cooldown = {delay}
|
||||
else
|
||||
if hasFile = !!post.file
|
||||
if post.file
|
||||
upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND)
|
||||
QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2
|
||||
QR.cooldown.upSpd = upSpd
|
||||
cooldown = {isReply, hasFile, threadID}
|
||||
cooldown = {isReply, threadID}
|
||||
QR.cooldown.cooldowns[start] = cooldown
|
||||
$.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns
|
||||
QR.cooldown.start()
|
||||
@ -360,16 +360,12 @@ QR =
|
||||
# reply cooldown with a reply, thread cooldown with a thread
|
||||
elapsed = Math.floor (now - start) / $.SECOND
|
||||
continue if elapsed < 0 # clock changed since then?
|
||||
unless isReply
|
||||
type = 'thread'
|
||||
type = unless isReply
|
||||
'thread'
|
||||
else if hasFile
|
||||
# You can post an image reply immediately after a non-image reply.
|
||||
unless cooldown.hasFile
|
||||
seconds = Math.max seconds, 0
|
||||
continue
|
||||
type = 'image'
|
||||
'image'
|
||||
else
|
||||
type = 'reply'
|
||||
'reply'
|
||||
maxTimer = Math.max types[type] or 0, types[type + '_intra'] or 0
|
||||
unless start <= now <= start + maxTimer * $.SECOND
|
||||
QR.cooldown.unset start
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user