Merge branch 'qr' into next
This commit is contained in:
commit
be119b7f17
@ -4,6 +4,9 @@ The links to individual versions below are to copies of the script with the upda
|
|||||||
|
|
||||||
### v1.10.6
|
### v1.10.6
|
||||||
|
|
||||||
|
**v1.10.6.6** *(2015-03-25)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.6/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
- Work around issue where 4chan confirms post success before creating the thread, causing people to be sent to the 404 page instead of their thread.
|
||||||
|
|
||||||
**v1.10.6.5** *(2015-03-24)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.5/builds/4chan-X-noupdate.crx "Chromium version")]
|
**v1.10.6.5** *(2015-03-24)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.6.5/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
- Fix updater beeping on filtered posts / your own posts.
|
- Fix updater beeping on filtered posts / your own posts.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.6.5
|
// @version 1.10.6.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.6.5
|
// @version 1.10.6.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -395,7 +395,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.6.5',
|
VERSION: '1.10.6.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -7593,7 +7593,7 @@
|
|||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, m, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
var URL, _, ban, err, h1, isReply, m, open, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
@ -7670,14 +7670,38 @@
|
|||||||
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
||||||
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
||||||
if (URL) {
|
if (URL) {
|
||||||
if (Conf['Open Post in New Tab'] || postsCount) {
|
open = Conf['Open Post in New Tab'] || postsCount ? function() {
|
||||||
$.open(URL);
|
return $.open(URL);
|
||||||
|
} : function() {
|
||||||
|
return window.location = URL;
|
||||||
|
};
|
||||||
|
if (threadID === postID) {
|
||||||
|
QR.waitForThread(URL, open);
|
||||||
} else {
|
} else {
|
||||||
window.location = URL;
|
open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
|
waitForThread: function(url, cb) {
|
||||||
|
var attempts, check;
|
||||||
|
attempts = 0;
|
||||||
|
check = function() {
|
||||||
|
return $.ajax(url, {
|
||||||
|
onloadend: function() {
|
||||||
|
attempts++;
|
||||||
|
if (attempts >= 5 || this.status === 200) {
|
||||||
|
return cb();
|
||||||
|
} else {
|
||||||
|
return setTimeout(check, attempts * $.SECOND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'HEAD'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return check();
|
||||||
|
},
|
||||||
abort: function() {
|
abort: function() {
|
||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.6.5
|
// @version 1.10.6.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -394,7 +394,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.6.5',
|
VERSION: '1.10.6.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -7592,7 +7592,7 @@
|
|||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, m, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
var URL, _, ban, err, h1, isReply, m, open, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
@ -7669,14 +7669,38 @@
|
|||||||
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
||||||
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
||||||
if (URL) {
|
if (URL) {
|
||||||
if (Conf['Open Post in New Tab'] || postsCount) {
|
open = Conf['Open Post in New Tab'] || postsCount ? function() {
|
||||||
$.open(URL);
|
return $.open(URL);
|
||||||
|
} : function() {
|
||||||
|
return window.location = URL;
|
||||||
|
};
|
||||||
|
if (threadID === postID) {
|
||||||
|
QR.waitForThread(URL, open);
|
||||||
} else {
|
} else {
|
||||||
window.location = URL;
|
open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
|
waitForThread: function(url, cb) {
|
||||||
|
var attempts, check;
|
||||||
|
attempts = 0;
|
||||||
|
check = function() {
|
||||||
|
return $.ajax(url, {
|
||||||
|
onloadend: function() {
|
||||||
|
attempts++;
|
||||||
|
if (attempts >= 5 || this.status === 200) {
|
||||||
|
return cb();
|
||||||
|
} else {
|
||||||
|
return setTimeout(check, attempts * $.SECOND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'HEAD'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return check();
|
||||||
|
},
|
||||||
abort: function() {
|
abort: function() {
|
||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.6.5
|
// @version 1.10.6.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.6.5
|
// @version 1.10.6.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -395,7 +395,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.6.5',
|
VERSION: '1.10.6.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -7593,7 +7593,7 @@
|
|||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, m, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
var URL, _, ban, err, h1, isReply, m, open, post, postID, postsCount, ref, ref1, req, resDoc, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
@ -7670,14 +7670,38 @@
|
|||||||
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
QR.cooldown.add(req.uploadEndTime, threadID, postID);
|
||||||
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
||||||
if (URL) {
|
if (URL) {
|
||||||
if (Conf['Open Post in New Tab'] || postsCount) {
|
open = Conf['Open Post in New Tab'] || postsCount ? function() {
|
||||||
$.open(URL);
|
return $.open(URL);
|
||||||
|
} : function() {
|
||||||
|
return window.location = URL;
|
||||||
|
};
|
||||||
|
if (threadID === postID) {
|
||||||
|
QR.waitForThread(URL, open);
|
||||||
} else {
|
} else {
|
||||||
window.location = URL;
|
open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.status();
|
return QR.status();
|
||||||
},
|
},
|
||||||
|
waitForThread: function(url, cb) {
|
||||||
|
var attempts, check;
|
||||||
|
attempts = 0;
|
||||||
|
check = function() {
|
||||||
|
return $.ajax(url, {
|
||||||
|
onloadend: function() {
|
||||||
|
attempts++;
|
||||||
|
if (attempts >= 5 || this.status === 200) {
|
||||||
|
return cb();
|
||||||
|
} else {
|
||||||
|
return setTimeout(check, attempts * $.SECOND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: 'HEAD'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return check();
|
||||||
|
},
|
||||||
abort: function() {
|
abort: function() {
|
||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.6.5' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.6.6' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.6.5' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.6.6' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.10.6.5",
|
"version": "1.10.6.6",
|
||||||
"date": "2015-03-25T04:33:38.095Z",
|
"date": "2015-03-26T04:18:29.835Z",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
@ -748,6 +748,8 @@ QR =
|
|||||||
postsCount = QR.posts.length - 1
|
postsCount = QR.posts.length - 1
|
||||||
QR.cooldown.auto = postsCount and isReply
|
QR.cooldown.auto = postsCount and isReply
|
||||||
|
|
||||||
|
lastPostToThread = not (do -> return true for p in QR.posts[1..] when p.thread is post.thread)
|
||||||
|
|
||||||
unless Conf['Persistent QR'] or postsCount
|
unless Conf['Persistent QR'] or postsCount
|
||||||
QR.close()
|
QR.close()
|
||||||
else
|
else
|
||||||
@ -758,17 +760,37 @@ QR =
|
|||||||
|
|
||||||
URL = if threadID is postID # new thread
|
URL = if threadID is postID # new thread
|
||||||
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}"
|
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}"
|
||||||
else if g.VIEW is 'index' and !QR.cooldown.auto and Conf['Open Post in New Tab'] # replying from the index
|
else if g.VIEW is 'index' and lastPostToThread and Conf['Open Post in New Tab'] # replying from the index
|
||||||
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}#p#{postID}"
|
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}#p#{postID}"
|
||||||
|
|
||||||
if URL
|
if URL
|
||||||
if Conf['Open Post in New Tab'] or postsCount
|
open = if Conf['Open Post in New Tab'] or postsCount
|
||||||
$.open URL
|
-> $.open URL
|
||||||
else
|
else
|
||||||
window.location = URL
|
-> window.location = URL
|
||||||
|
|
||||||
|
if threadID is postID
|
||||||
|
# XXX 4chan sometimes responds before the thread exists.
|
||||||
|
QR.waitForThread URL, open
|
||||||
|
else
|
||||||
|
open()
|
||||||
|
|
||||||
QR.status()
|
QR.status()
|
||||||
|
|
||||||
|
waitForThread: (url, cb) ->
|
||||||
|
attempts = 0
|
||||||
|
check = ->
|
||||||
|
$.ajax url,
|
||||||
|
onloadend: ->
|
||||||
|
attempts++
|
||||||
|
if attempts >= 5 or @status is 200
|
||||||
|
cb()
|
||||||
|
else
|
||||||
|
setTimeout check, attempts * $.SECOND
|
||||||
|
,
|
||||||
|
type: 'HEAD'
|
||||||
|
check()
|
||||||
|
|
||||||
abort: ->
|
abort: ->
|
||||||
if QR.req and !QR.req.isUploadFinished
|
if QR.req and !QR.req.isUploadFinished
|
||||||
QR.req.abort()
|
QR.req.abort()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user