Merge branch 'v3' of git://github.com/zixaphir/appchan-x

This commit is contained in:
Jordan Bates 2013-04-25 04:35:58 -07:00
commit fb8d765e9b
5 changed files with 15 additions and 19 deletions

View File

@ -6975,7 +6975,7 @@
return $.addClass(doc, 'hide-original-post-form');
});
}
$.on(d, '4chanXInitFinished', this.initReady);
$.ready(this.initReady);
return Post.prototype.callbacks.push({
name: 'Quick Reply',
cb: this.node
@ -6984,7 +6984,6 @@
initReady: function() {
var link, title;
$.off(d, '4chanXInitFinished', QR.initReady);
QR.postingIsEnabled = !!$.id('postForm');
if (!QR.postingIsEnabled) {
return;
@ -9749,13 +9748,13 @@
softTask = function() {
var args, func, task;
if (!queue.length) {
return;
}
task = queue.shift();
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
if (!queue.length) {
return;
}
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {

View File

@ -6971,7 +6971,7 @@
return $.addClass(doc, 'hide-original-post-form');
});
}
$.on(d, '4chanXInitFinished', this.initReady);
$.ready(this.initReady);
return Post.prototype.callbacks.push({
name: 'Quick Reply',
cb: this.node
@ -6980,7 +6980,6 @@
initReady: function() {
var link, title;
$.off(d, '4chanXInitFinished', QR.initReady);
QR.postingIsEnabled = !!$.id('postForm');
if (!QR.postingIsEnabled) {
return;
@ -9772,13 +9771,13 @@
softTask = function() {
var args, func, task;
if (!queue.length) {
return;
}
task = queue.shift();
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
if (!queue.length) {
return;
}
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {

View File

@ -6840,7 +6840,7 @@
return $.addClass(doc, 'hide-original-post-form');
});
}
$.on(d, '4chanXInitFinished', this.initReady);
$.ready(this.initReady);
return Post.prototype.callbacks.push({
name: 'Quick Reply',
cb: this.node
@ -6849,7 +6849,6 @@
initReady: function() {
var link, title;
$.off(d, '4chanXInitFinished', QR.initReady);
QR.postingIsEnabled = !!$.id('postForm');
if (!QR.postingIsEnabled) {
return;
@ -9615,13 +9614,13 @@
softTask = function() {
var args, func, task;
if (!queue.length) {
return;
}
task = queue.shift();
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
if (!queue.length) {
return;
}
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {

View File

@ -24,14 +24,13 @@ QR =
if Conf['Hide Original Post Form']
$.asap (-> doc), -> $.addClass doc, 'hide-original-post-form'
$.on d, '4chanXInitFinished', @initReady
$.ready @initReady
Post::callbacks.push
name: 'Quick Reply'
cb: @node
initReady: ->
$.off d, '4chanXInitFinished', QR.initReady
QR.postingIsEnabled = !!$.id 'postForm'
return unless QR.postingIsEnabled

View File

@ -198,7 +198,7 @@ Main =
Main.callbackNodesDB Post, posts, ->
$.event '4chanXInitFinished'
Main.checkUpdate()
return
$.event '4chanXInitFinished'
@ -225,11 +225,11 @@ Main =
callbackNodesDB: (klass, nodes, cb) ->
queue = []
softTask = ->
return unless queue.length
task = queue.shift()
func = task[0]
args = Array::slice.call task, 1
func.apply func, args
return unless queue.length
if (queue.length % 7) is 0
setTimeout softTask, 0
else