Merge branch 'v3' of git://github.com/zixaphir/appchan-x
This commit is contained in:
commit
fb8d765e9b
@ -6975,7 +6975,7 @@
|
|||||||
return $.addClass(doc, 'hide-original-post-form');
|
return $.addClass(doc, 'hide-original-post-form');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.on(d, '4chanXInitFinished', this.initReady);
|
$.ready(this.initReady);
|
||||||
return Post.prototype.callbacks.push({
|
return Post.prototype.callbacks.push({
|
||||||
name: 'Quick Reply',
|
name: 'Quick Reply',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
@ -6984,7 +6984,6 @@
|
|||||||
initReady: function() {
|
initReady: function() {
|
||||||
var link, title;
|
var link, title;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QR.initReady);
|
|
||||||
QR.postingIsEnabled = !!$.id('postForm');
|
QR.postingIsEnabled = !!$.id('postForm');
|
||||||
if (!QR.postingIsEnabled) {
|
if (!QR.postingIsEnabled) {
|
||||||
return;
|
return;
|
||||||
@ -9749,13 +9748,13 @@
|
|||||||
softTask = function() {
|
softTask = function() {
|
||||||
var args, func, task;
|
var args, func, task;
|
||||||
|
|
||||||
if (!queue.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
task = queue.shift();
|
task = queue.shift();
|
||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
|
if (!queue.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((queue.length % 7) === 0) {
|
if ((queue.length % 7) === 0) {
|
||||||
return setTimeout(softTask, 0);
|
return setTimeout(softTask, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -6971,7 +6971,7 @@
|
|||||||
return $.addClass(doc, 'hide-original-post-form');
|
return $.addClass(doc, 'hide-original-post-form');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.on(d, '4chanXInitFinished', this.initReady);
|
$.ready(this.initReady);
|
||||||
return Post.prototype.callbacks.push({
|
return Post.prototype.callbacks.push({
|
||||||
name: 'Quick Reply',
|
name: 'Quick Reply',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
@ -6980,7 +6980,6 @@
|
|||||||
initReady: function() {
|
initReady: function() {
|
||||||
var link, title;
|
var link, title;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QR.initReady);
|
|
||||||
QR.postingIsEnabled = !!$.id('postForm');
|
QR.postingIsEnabled = !!$.id('postForm');
|
||||||
if (!QR.postingIsEnabled) {
|
if (!QR.postingIsEnabled) {
|
||||||
return;
|
return;
|
||||||
@ -9772,13 +9771,13 @@
|
|||||||
softTask = function() {
|
softTask = function() {
|
||||||
var args, func, task;
|
var args, func, task;
|
||||||
|
|
||||||
if (!queue.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
task = queue.shift();
|
task = queue.shift();
|
||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
|
if (!queue.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((queue.length % 7) === 0) {
|
if ((queue.length % 7) === 0) {
|
||||||
return setTimeout(softTask, 0);
|
return setTimeout(softTask, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -6840,7 +6840,7 @@
|
|||||||
return $.addClass(doc, 'hide-original-post-form');
|
return $.addClass(doc, 'hide-original-post-form');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.on(d, '4chanXInitFinished', this.initReady);
|
$.ready(this.initReady);
|
||||||
return Post.prototype.callbacks.push({
|
return Post.prototype.callbacks.push({
|
||||||
name: 'Quick Reply',
|
name: 'Quick Reply',
|
||||||
cb: this.node
|
cb: this.node
|
||||||
@ -6849,7 +6849,6 @@
|
|||||||
initReady: function() {
|
initReady: function() {
|
||||||
var link, title;
|
var link, title;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QR.initReady);
|
|
||||||
QR.postingIsEnabled = !!$.id('postForm');
|
QR.postingIsEnabled = !!$.id('postForm');
|
||||||
if (!QR.postingIsEnabled) {
|
if (!QR.postingIsEnabled) {
|
||||||
return;
|
return;
|
||||||
@ -9615,13 +9614,13 @@
|
|||||||
softTask = function() {
|
softTask = function() {
|
||||||
var args, func, task;
|
var args, func, task;
|
||||||
|
|
||||||
if (!queue.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
task = queue.shift();
|
task = queue.shift();
|
||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
|
if (!queue.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((queue.length % 7) === 0) {
|
if ((queue.length % 7) === 0) {
|
||||||
return setTimeout(softTask, 0);
|
return setTimeout(softTask, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -24,14 +24,13 @@ QR =
|
|||||||
if Conf['Hide Original Post Form']
|
if Conf['Hide Original Post Form']
|
||||||
$.asap (-> doc), -> $.addClass doc, 'hide-original-post-form'
|
$.asap (-> doc), -> $.addClass doc, 'hide-original-post-form'
|
||||||
|
|
||||||
$.on d, '4chanXInitFinished', @initReady
|
$.ready @initReady
|
||||||
|
|
||||||
Post::callbacks.push
|
Post::callbacks.push
|
||||||
name: 'Quick Reply'
|
name: 'Quick Reply'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
initReady: ->
|
initReady: ->
|
||||||
$.off d, '4chanXInitFinished', QR.initReady
|
|
||||||
QR.postingIsEnabled = !!$.id 'postForm'
|
QR.postingIsEnabled = !!$.id 'postForm'
|
||||||
return unless QR.postingIsEnabled
|
return unless QR.postingIsEnabled
|
||||||
|
|
||||||
|
|||||||
@ -198,7 +198,7 @@ Main =
|
|||||||
Main.callbackNodesDB Post, posts, ->
|
Main.callbackNodesDB Post, posts, ->
|
||||||
$.event '4chanXInitFinished'
|
$.event '4chanXInitFinished'
|
||||||
Main.checkUpdate()
|
Main.checkUpdate()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
$.event '4chanXInitFinished'
|
$.event '4chanXInitFinished'
|
||||||
@ -225,11 +225,11 @@ Main =
|
|||||||
callbackNodesDB: (klass, nodes, cb) ->
|
callbackNodesDB: (klass, nodes, cb) ->
|
||||||
queue = []
|
queue = []
|
||||||
softTask = ->
|
softTask = ->
|
||||||
return unless queue.length
|
|
||||||
task = queue.shift()
|
task = queue.shift()
|
||||||
func = task[0]
|
func = task[0]
|
||||||
args = Array::slice.call task, 1
|
args = Array::slice.call task, 1
|
||||||
func.apply func, args
|
func.apply func, args
|
||||||
|
return unless queue.length
|
||||||
if (queue.length % 7) is 0
|
if (queue.length % 7) is 0
|
||||||
setTimeout softTask, 0
|
setTimeout softTask, 0
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user