Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	LICENSE
	builds/crx/script.js
This commit is contained in:
Zixaphir 2013-11-26 12:22:13 -07:00
commit 2f7dd5a185
7 changed files with 55 additions and 82 deletions

View File

@ -1,13 +1,3 @@
<<<<<<< HEAD
### v2.5.1
*2013-10-20*
**Zixaphir**:
- Infinite Scrolling Bugfix (chrome)
## v2.5.0
*2013-10-19*
=======
**MayhemYDG**:
- Tiny posting cooldown adjustment:
- You can post an image reply immediately after a non-image reply.
@ -46,21 +36,14 @@
</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
*2013-11-10*
**noface**:
- Strawpoll.me embedding support (as usual, only works on HTTP 4chan due to lack of HTTPS)
### v1.2.42
*2013-10-22*
>>>>>>> v3
### v2.5.1
*2013-10-20*
**Zixaphir**:
- Better MediaCru.sh embedding
- Infinite Scrolling
- Infinite Scrolling Bugfix (chrome)
### v2.4.1
*2013-10-13*

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.5.1 - 2013-11-23
* appchan x - Version 2.5.1 - 2013-11-26
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -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);

View File

@ -22,7 +22,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.5.1 - 2013-11-23
* appchan x - Version 2.5.1 - 2013-11-26
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -4948,6 +4948,14 @@
return filename;
}
},
thumbRotate: (function() {
var n;
n = 0;
return function() {
return n = (n + 1) % 3;
};
})(),
postFromObject: function(data, boardID) {
var o;
@ -4978,7 +4986,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,
@ -8475,7 +8483,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;
@ -8487,14 +8495,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
};
}
@ -8544,17 +8551,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);

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.5.1 - 2013-11-23
* appchan x - Version 2.5.1 - 2013-11-26
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -4961,6 +4961,14 @@
return filename;
}
},
thumbRotate: (function() {
var n;
n = 0;
return function() {
return n = (n + 1) % 3;
};
})(),
postFromObject: function(data, boardID) {
var o;
@ -4991,7 +4999,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,
@ -8486,7 +8494,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;
@ -8498,14 +8506,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
};
}
@ -8555,17 +8562,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);

View File

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

View File

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