Add some stuff, hopefully should reduce errors
This commit is contained in:
parent
d8a281c569
commit
79cf8713a4
@ -5047,7 +5047,7 @@
|
|||||||
order: 98
|
order: 98
|
||||||
});
|
});
|
||||||
if (!Conf['Unread Count']) {
|
if (!Conf['Unread Count']) {
|
||||||
$.on(d, '4chanXInitFinished', this.setup);
|
$.on(d, '4chanXInitFinished', this.ready);
|
||||||
}
|
}
|
||||||
return Post.callbacks.push({
|
return Post.callbacks.push({
|
||||||
name: 'Quote Threading',
|
name: 'Quote Threading',
|
||||||
@ -5064,8 +5064,8 @@
|
|||||||
delete this.entry;
|
delete this.entry;
|
||||||
return Post.callbacks.disconnect('Quote Threading');
|
return Post.callbacks.disconnect('Quote Threading');
|
||||||
},
|
},
|
||||||
setup: function() {
|
ready: function() {
|
||||||
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
$.off(d, '4chanXInitFinished', QuoteThreading.ready);
|
||||||
return QuoteThreading.force();
|
return QuoteThreading.force();
|
||||||
},
|
},
|
||||||
force: function() {
|
force: function() {
|
||||||
@ -10606,11 +10606,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ExpandThread = {
|
ExpandThread = {
|
||||||
|
statuses: {},
|
||||||
init: function() {
|
init: function() {
|
||||||
if (g.VIEW !== 'index' || !Conf['Thread Expansion']) {
|
if (g.VIEW === 'thread' || !Conf['Thread Expansion']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.statuses = {};
|
|
||||||
return $.on(d, 'IndexRefresh', this.onIndexRefresh);
|
return $.on(d, 'IndexRefresh', this.onIndexRefresh);
|
||||||
},
|
},
|
||||||
setButton: function(thread) {
|
setButton: function(thread) {
|
||||||
@ -10621,8 +10621,8 @@
|
|||||||
a.textContent = ExpandThread.text.apply(ExpandThread, ['+'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
a.textContent = ExpandThread.text.apply(ExpandThread, ['+'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
||||||
return $.on(a, 'click', ExpandThread.cbToggle);
|
return $.on(a, 'click', ExpandThread.cbToggle);
|
||||||
},
|
},
|
||||||
onIndexRefresh: function() {
|
disconnect: function(refresh) {
|
||||||
var status, thread, threadID, _ref, _ref1, _ref2;
|
var status, threadID, _ref, _ref1;
|
||||||
_ref = ExpandThread.statuses;
|
_ref = ExpandThread.statuses;
|
||||||
for (threadID in _ref) {
|
for (threadID in _ref) {
|
||||||
status = _ref[threadID];
|
status = _ref[threadID];
|
||||||
@ -10631,9 +10631,16 @@
|
|||||||
}
|
}
|
||||||
delete ExpandThread.statuses[threadID];
|
delete ExpandThread.statuses[threadID];
|
||||||
}
|
}
|
||||||
_ref2 = g.BOARD.threads;
|
if (!refresh) {
|
||||||
for (threadID in _ref2) {
|
return $.off(d, 'IndexRefresh', this.onIndexRefresh);
|
||||||
thread = _ref2[threadID];
|
}
|
||||||
|
},
|
||||||
|
onIndexRefresh: function() {
|
||||||
|
var thread, threadID, _ref;
|
||||||
|
ExpandThread.disconnect(true);
|
||||||
|
_ref = g.BOARD.threads;
|
||||||
|
for (threadID in _ref) {
|
||||||
|
thread = _ref[threadID];
|
||||||
ExpandThread.setButton(thread);
|
ExpandThread.setButton(thread);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -11850,7 +11857,7 @@
|
|||||||
g.BOARD.threads = {};
|
g.BOARD.threads = {};
|
||||||
return $.rmAll($('.board'));
|
return $.rmAll($('.board'));
|
||||||
},
|
},
|
||||||
threadFeatures: [['Unread Count', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater]],
|
threadFeatures: [['Unread Count', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Expansion', ExpandThread]],
|
||||||
disconnect: function() {
|
disconnect: function() {
|
||||||
var err, errors, feature, features, name, _i, _len, _ref;
|
var err, errors, feature, features, name, _i, _len, _ref;
|
||||||
features = g.VIEW === 'thread' ? Navigate.threadFeatures : [];
|
features = g.VIEW === 'thread' ? Navigate.threadFeatures : [];
|
||||||
@ -11890,143 +11897,48 @@
|
|||||||
error: err
|
error: err
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (errors) {
|
}
|
||||||
Main.handleErrors(errors);
|
if (errors) {
|
||||||
}
|
Main.handleErrors(errors);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateContext: function(view) {
|
ready: function() {
|
||||||
$.rmClass(doc, g.VIEW);
|
var condition, err, errors, feature, features, name, _i, _len, _ref;
|
||||||
$.addClass(doc, view);
|
features = [['Unread Count', Unread, Conf['Unread Count']], ['Quote Threading', QuoteThreading, Conf['Quote Threading'] && !Conf['Unread Count']]];
|
||||||
return g.VIEW = view;
|
for (_i = 0, _len = features.length; _i < _len; _i++) {
|
||||||
},
|
_ref = features[_i], name = _ref[0], feature = _ref[1], condition = _ref[2];
|
||||||
navigate: function(e) {
|
|
||||||
var boardID, hash, onload, path, threadID, view;
|
|
||||||
if (this.hostname !== 'boards.4chan.org' || window.location.hostname === 'rs.4chan.org') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
path = this.pathname.split('/');
|
|
||||||
hash = this.hash;
|
|
||||||
if (path[0] === '') {
|
|
||||||
path.shift();
|
|
||||||
}
|
|
||||||
boardID = path[0], view = path[1], threadID = path[2];
|
|
||||||
if (view === 'catalog' || ('f' === boardID || 'f' === g.BOARD.ID)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
if (this.id !== 'popState') {
|
|
||||||
history.pushState(null, '', this.pathname);
|
|
||||||
}
|
|
||||||
view = threadID ? 'thread' : view || 'index';
|
|
||||||
if (view !== g.VIEW) {
|
|
||||||
Navigate.disconnect();
|
|
||||||
Navigate.clean();
|
|
||||||
Navigate.updateContext(view);
|
|
||||||
Navigate.reconnect();
|
|
||||||
}
|
|
||||||
if (view === 'index') {
|
|
||||||
if (boardID === g.BOARD.ID) {
|
|
||||||
d.title = $('.boardTitle').textContent;
|
|
||||||
} else {
|
|
||||||
Navigate.updateBoard(boardID);
|
|
||||||
}
|
|
||||||
return Index.update();
|
|
||||||
} else {
|
|
||||||
onload = function(e) {
|
|
||||||
return Navigate.load(e, hash);
|
|
||||||
};
|
|
||||||
return Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
|
||||||
onabort: onload,
|
|
||||||
onloadend: onload
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
load: function(e) {
|
|
||||||
var err, notice, req;
|
|
||||||
$.rmClass(Index.button, 'fa-spin');
|
|
||||||
req = Navigate.req, notice = Navigate.notice;
|
|
||||||
delete Navigate.req;
|
|
||||||
delete Navigate.notice;
|
|
||||||
if (e.type === 'abort') {
|
|
||||||
req.onloadend = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (req.status === 200) {
|
|
||||||
Navigate.parse(JSON.parse(req.response).posts);
|
|
||||||
$.on(d, '4chanXInitFinished', Navigate.finish);
|
|
||||||
return $.event('4chanXInitFinished');
|
|
||||||
}
|
|
||||||
} catch (_error) {
|
|
||||||
err = _error;
|
|
||||||
console.error('Navigate failure:');
|
|
||||||
console.log(err);
|
|
||||||
if (notice) {
|
|
||||||
notice.setType('error');
|
|
||||||
notice.el.lastElementChild.textContent = 'Navigation Failed.';
|
|
||||||
setTimeout(notice.close, 2 * $.SECOND);
|
|
||||||
} else {
|
|
||||||
new Notice('error', 'Navigation Failed.', 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
finish: function() {
|
|
||||||
$.off(d, '4chanXInitFinished', Navigate.finish);
|
|
||||||
Navigate.buildThread();
|
|
||||||
return Header.scrollToIfNeeded($('.board'));
|
|
||||||
},
|
|
||||||
parse: function(data) {
|
|
||||||
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
|
|
||||||
board = g.BOARD;
|
|
||||||
threadRoot = Build.thread(board, OP = data.shift(), true);
|
|
||||||
thread = new Thread(OP.no, board);
|
|
||||||
nodes = [threadRoot];
|
|
||||||
posts = [];
|
|
||||||
errors = null;
|
|
||||||
makePost = function(postNode) {
|
|
||||||
var err;
|
|
||||||
try {
|
try {
|
||||||
return posts.push(new Post(postNode, thread, board));
|
if (condition) {
|
||||||
|
feature.ready();
|
||||||
|
}
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
err = _error;
|
err = _error;
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
errors = [];
|
errors = [];
|
||||||
}
|
}
|
||||||
return errors.push({
|
errors.push({
|
||||||
message: "Parsing of Post No." + thread.ID + " failed. Post will be skipped.",
|
message: "Failed to reconnect feature " + name + ".",
|
||||||
error: err
|
error: err
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
|
||||||
makePost($('.opContainer', threadRoot));
|
|
||||||
for (_i = 0, _len = data.length; _i < _len; _i++) {
|
|
||||||
obj = data[_i];
|
|
||||||
nodes.push(post = Build.postFromObject(obj, board));
|
|
||||||
makePost(post);
|
|
||||||
}
|
}
|
||||||
if (errors) {
|
if (errors) {
|
||||||
Main.handleErrors(errors);
|
Main.handleErrors(errors);
|
||||||
}
|
}
|
||||||
$.nodes(Navigate.nodes = nodes);
|
return QR.generatePostableThreadsList();
|
||||||
Main.callbackNodes(Thread, [thread]);
|
|
||||||
return Main.callbackNodes(Post, posts);
|
|
||||||
},
|
},
|
||||||
buildThread: function() {
|
updateContext: function(view) {
|
||||||
var board;
|
$.rmClass(doc, g.VIEW);
|
||||||
board = $('.board');
|
$.addClass(doc, view);
|
||||||
$.rmAll(board);
|
g.VIEW = view;
|
||||||
return $.add(board, Navigate.nodes);
|
switch (view) {
|
||||||
},
|
case 'index':
|
||||||
popstate: function() {
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
var a;
|
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
||||||
a = $.el('a', {
|
case 'thread':
|
||||||
href: window.location,
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
id: 'popState'
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
});
|
}
|
||||||
return Navigate.navigate.call(a);
|
|
||||||
},
|
},
|
||||||
updateBoard: function(boardID) {
|
updateBoard: function(boardID) {
|
||||||
var onload, req;
|
var onload, req;
|
||||||
@ -12073,6 +11985,135 @@
|
|||||||
}
|
}
|
||||||
return $('.boardTitle').textContent = d.title = "/" + board + "/ - " + title;
|
return $('.boardTitle').textContent = d.title = "/" + board + "/ - " + title;
|
||||||
},
|
},
|
||||||
|
navigate: function(e) {
|
||||||
|
var boardID, hash, onload, path, threadID, view;
|
||||||
|
if (this.hostname !== 'boards.4chan.org' || window.location.hostname === 'rs.4chan.org') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = this.pathname.split('/');
|
||||||
|
hash = this.hash;
|
||||||
|
if (path[0] === '') {
|
||||||
|
path.shift();
|
||||||
|
}
|
||||||
|
boardID = path[0], view = path[1], threadID = path[2];
|
||||||
|
if (view === 'catalog' || ('f' === boardID || 'f' === g.BOARD.ID)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
if (this.id !== 'popState') {
|
||||||
|
history.pushState(null, '', this.pathname);
|
||||||
|
}
|
||||||
|
view = threadID ? 'thread' : view || 'index';
|
||||||
|
if (view !== g.VIEW) {
|
||||||
|
Navigate.disconnect();
|
||||||
|
Navigate.clean();
|
||||||
|
Navigate.updateContext(view);
|
||||||
|
Navigate.reconnect();
|
||||||
|
}
|
||||||
|
if (view === 'index') {
|
||||||
|
if (boardID === g.BOARD.ID) {
|
||||||
|
d.title = $('.boardTitle').textContent;
|
||||||
|
} else {
|
||||||
|
Navigate.updateBoard(boardID);
|
||||||
|
}
|
||||||
|
return Index.update();
|
||||||
|
} else {
|
||||||
|
onload = function(e) {
|
||||||
|
return Navigate.load(e, hash);
|
||||||
|
};
|
||||||
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
||||||
|
onabort: onload,
|
||||||
|
onloadend: onload
|
||||||
|
});
|
||||||
|
return setTimeout((function() {
|
||||||
|
if (Navigate.req && !Navigate.notice) {
|
||||||
|
return Navigate.notice = new Notice('info', 'Loading thread...');
|
||||||
|
}
|
||||||
|
}), 3 * $.SECOND);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
load: function(e) {
|
||||||
|
var err, notice, req;
|
||||||
|
$.rmClass(Index.button, 'fa-spin');
|
||||||
|
req = Navigate.req, notice = Navigate.notice;
|
||||||
|
delete Navigate.req;
|
||||||
|
delete Navigate.notice;
|
||||||
|
if (e.type === 'abort') {
|
||||||
|
req.onloadend = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (req.status === 200) {
|
||||||
|
return Navigate.parse(JSON.parse(req.response).posts);
|
||||||
|
}
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
console.error('Navigate failure:');
|
||||||
|
console.log(err);
|
||||||
|
if (notice) {
|
||||||
|
notice.setType('error');
|
||||||
|
notice.el.lastElementChild.textContent = 'Navigation Failed.';
|
||||||
|
setTimeout(notice.close, 2 * $.SECOND);
|
||||||
|
} else {
|
||||||
|
new Notice('error', 'Navigation Failed.', 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
parse: function(data) {
|
||||||
|
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
|
||||||
|
board = g.BOARD;
|
||||||
|
threadRoot = Build.thread(board, OP = data.shift(), true);
|
||||||
|
thread = new Thread(OP.no, board);
|
||||||
|
nodes = [threadRoot];
|
||||||
|
posts = [];
|
||||||
|
errors = null;
|
||||||
|
makePost = function(postNode) {
|
||||||
|
var err;
|
||||||
|
try {
|
||||||
|
return posts.push(new Post(postNode, thread, board));
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
if (!errors) {
|
||||||
|
errors = [];
|
||||||
|
}
|
||||||
|
return errors.push({
|
||||||
|
message: "Parsing of Post No." + thread.ID + " failed. Post will be skipped.",
|
||||||
|
error: err
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
makePost($('.opContainer', threadRoot));
|
||||||
|
for (_i = 0, _len = data.length; _i < _len; _i++) {
|
||||||
|
obj = data[_i];
|
||||||
|
nodes.push(post = Build.postFromObject(obj, board));
|
||||||
|
makePost(post);
|
||||||
|
}
|
||||||
|
if (errors) {
|
||||||
|
Main.handleErrors(errors);
|
||||||
|
}
|
||||||
|
$.nodes(Navigate.nodes = nodes);
|
||||||
|
Main.callbackNodes(Thread, [thread]);
|
||||||
|
Main.callbackNodes(Post, posts);
|
||||||
|
Navigate.ready();
|
||||||
|
Navigate.buildThread();
|
||||||
|
return Header.scrollToIfNeeded($('.board'));
|
||||||
|
},
|
||||||
|
buildThread: function() {
|
||||||
|
var board;
|
||||||
|
board = $('.board');
|
||||||
|
$.rmAll(board);
|
||||||
|
return $.add(board, Navigate.nodes);
|
||||||
|
},
|
||||||
|
popstate: function() {
|
||||||
|
var a;
|
||||||
|
a = $.el('a', {
|
||||||
|
href: window.location,
|
||||||
|
id: 'popState'
|
||||||
|
});
|
||||||
|
return Navigate.navigate.call(a);
|
||||||
|
},
|
||||||
refresh: function(context) {
|
refresh: function(context) {
|
||||||
var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1;
|
var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -5050,7 +5050,7 @@
|
|||||||
order: 98
|
order: 98
|
||||||
});
|
});
|
||||||
if (!Conf['Unread Count']) {
|
if (!Conf['Unread Count']) {
|
||||||
$.on(d, '4chanXInitFinished', this.setup);
|
$.on(d, '4chanXInitFinished', this.ready);
|
||||||
}
|
}
|
||||||
return Post.callbacks.push({
|
return Post.callbacks.push({
|
||||||
name: 'Quote Threading',
|
name: 'Quote Threading',
|
||||||
@ -5067,8 +5067,8 @@
|
|||||||
delete this.entry;
|
delete this.entry;
|
||||||
return Post.callbacks.disconnect('Quote Threading');
|
return Post.callbacks.disconnect('Quote Threading');
|
||||||
},
|
},
|
||||||
setup: function() {
|
ready: function() {
|
||||||
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
$.off(d, '4chanXInitFinished', QuoteThreading.ready);
|
||||||
return QuoteThreading.force();
|
return QuoteThreading.force();
|
||||||
},
|
},
|
||||||
force: function() {
|
force: function() {
|
||||||
@ -10595,11 +10595,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ExpandThread = {
|
ExpandThread = {
|
||||||
|
statuses: {},
|
||||||
init: function() {
|
init: function() {
|
||||||
if (g.VIEW !== 'index' || !Conf['Thread Expansion']) {
|
if (g.VIEW === 'thread' || !Conf['Thread Expansion']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.statuses = {};
|
|
||||||
return $.on(d, 'IndexRefresh', this.onIndexRefresh);
|
return $.on(d, 'IndexRefresh', this.onIndexRefresh);
|
||||||
},
|
},
|
||||||
setButton: function(thread) {
|
setButton: function(thread) {
|
||||||
@ -10610,8 +10610,8 @@
|
|||||||
a.textContent = ExpandThread.text.apply(ExpandThread, ['+'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
a.textContent = ExpandThread.text.apply(ExpandThread, ['+'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
||||||
return $.on(a, 'click', ExpandThread.cbToggle);
|
return $.on(a, 'click', ExpandThread.cbToggle);
|
||||||
},
|
},
|
||||||
onIndexRefresh: function() {
|
disconnect: function(refresh) {
|
||||||
var status, thread, threadID, _ref, _ref1, _ref2;
|
var status, threadID, _ref, _ref1;
|
||||||
_ref = ExpandThread.statuses;
|
_ref = ExpandThread.statuses;
|
||||||
for (threadID in _ref) {
|
for (threadID in _ref) {
|
||||||
status = _ref[threadID];
|
status = _ref[threadID];
|
||||||
@ -10620,9 +10620,16 @@
|
|||||||
}
|
}
|
||||||
delete ExpandThread.statuses[threadID];
|
delete ExpandThread.statuses[threadID];
|
||||||
}
|
}
|
||||||
_ref2 = g.BOARD.threads;
|
if (!refresh) {
|
||||||
for (threadID in _ref2) {
|
return $.off(d, 'IndexRefresh', this.onIndexRefresh);
|
||||||
thread = _ref2[threadID];
|
}
|
||||||
|
},
|
||||||
|
onIndexRefresh: function() {
|
||||||
|
var thread, threadID, _ref;
|
||||||
|
ExpandThread.disconnect(true);
|
||||||
|
_ref = g.BOARD.threads;
|
||||||
|
for (threadID in _ref) {
|
||||||
|
thread = _ref[threadID];
|
||||||
ExpandThread.setButton(thread);
|
ExpandThread.setButton(thread);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -11839,7 +11846,7 @@
|
|||||||
g.BOARD.threads = {};
|
g.BOARD.threads = {};
|
||||||
return $.rmAll($('.board'));
|
return $.rmAll($('.board'));
|
||||||
},
|
},
|
||||||
threadFeatures: [['Unread Count', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater]],
|
threadFeatures: [['Unread Count', Unread], ['Quote Threading', QuoteThreading], ['Thread Stats', ThreadStats], ['Thread Updater', ThreadUpdater], ['Thread Expansion', ExpandThread]],
|
||||||
disconnect: function() {
|
disconnect: function() {
|
||||||
var err, errors, feature, features, name, _i, _len, _ref;
|
var err, errors, feature, features, name, _i, _len, _ref;
|
||||||
features = g.VIEW === 'thread' ? Navigate.threadFeatures : [];
|
features = g.VIEW === 'thread' ? Navigate.threadFeatures : [];
|
||||||
@ -11879,145 +11886,48 @@
|
|||||||
error: err
|
error: err
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (errors) {
|
}
|
||||||
Main.handleErrors(errors);
|
if (errors) {
|
||||||
}
|
Main.handleErrors(errors);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateContext: function(view) {
|
ready: function() {
|
||||||
$.rmClass(doc, g.VIEW);
|
var condition, err, errors, feature, features, name, _i, _len, _ref;
|
||||||
$.addClass(doc, view);
|
features = [['Unread Count', Unread, Conf['Unread Count']], ['Quote Threading', QuoteThreading, Conf['Quote Threading'] && !Conf['Unread Count']]];
|
||||||
return g.VIEW = view;
|
for (_i = 0, _len = features.length; _i < _len; _i++) {
|
||||||
},
|
_ref = features[_i], name = _ref[0], feature = _ref[1], condition = _ref[2];
|
||||||
navigate: function(e) {
|
|
||||||
var boardID, hash, onload, path, threadID, view;
|
|
||||||
if (this.hostname !== 'boards.4chan.org' || window.location.hostname === 'rs.4chan.org') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
path = this.pathname.split('/');
|
|
||||||
hash = this.hash;
|
|
||||||
if (path[0] === '') {
|
|
||||||
path.shift();
|
|
||||||
}
|
|
||||||
boardID = path[0], view = path[1], threadID = path[2];
|
|
||||||
if (view === 'catalog' || ('f' === boardID || 'f' === g.BOARD.ID)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
if (this.id !== 'popState') {
|
|
||||||
history.pushState(null, '', this.pathname);
|
|
||||||
}
|
|
||||||
view = threadID ? 'thread' : view || 'index';
|
|
||||||
if (view !== g.VIEW) {
|
|
||||||
Navigate.disconnect();
|
|
||||||
Navigate.clean();
|
|
||||||
Navigate.updateContext(view);
|
|
||||||
Navigate.reconnect();
|
|
||||||
}
|
|
||||||
if (view === 'index') {
|
|
||||||
if (boardID === g.BOARD.ID) {
|
|
||||||
d.title = $('.boardTitle').textContent;
|
|
||||||
} else {
|
|
||||||
Navigate.updateBoard(boardID);
|
|
||||||
}
|
|
||||||
return Index.update();
|
|
||||||
} else {
|
|
||||||
onload = function(e) {
|
|
||||||
return Navigate.load(e, hash);
|
|
||||||
};
|
|
||||||
return Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
|
||||||
onabort: onload,
|
|
||||||
onloadend: onload
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
load: function(e) {
|
|
||||||
var err, notice, req;
|
|
||||||
$.rmClass(Index.button, 'fa-spin');
|
|
||||||
req = Navigate.req, notice = Navigate.notice;
|
|
||||||
delete Navigate.req;
|
|
||||||
delete Navigate.notice;
|
|
||||||
if (e.type === 'abort') {
|
|
||||||
req.onloadend = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (req.status === 200) {
|
|
||||||
Navigate.parse(JSON.parse(req.response).posts);
|
|
||||||
$.on(d, '4chanXInitFinished', Navigate.finish);
|
|
||||||
return $.event('4chanXInitFinished');
|
|
||||||
}
|
|
||||||
} catch (_error) {
|
|
||||||
err = _error;
|
|
||||||
console.error('Navigate failure:');
|
|
||||||
console.log(err);
|
|
||||||
if (notice) {
|
|
||||||
notice.setType('error');
|
|
||||||
notice.el.lastElementChild.textContent = 'Navigation Failed.';
|
|
||||||
setTimeout(notice.close, 2 * $.SECOND);
|
|
||||||
} else {
|
|
||||||
new Notice('error', 'Navigation Failed.', 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
finish: function() {
|
|
||||||
$.off(d, '4chanXInitFinished', Navigate.finish);
|
|
||||||
Navigate.buildThread();
|
|
||||||
return Header.scrollToIfNeeded($('.board'));
|
|
||||||
},
|
|
||||||
parse: function(data) {
|
|
||||||
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
|
|
||||||
board = g.BOARD;
|
|
||||||
threadRoot = Build.thread(board, OP = data.shift(), true);
|
|
||||||
thread = new Thread(OP.no, board);
|
|
||||||
nodes = [threadRoot];
|
|
||||||
posts = [];
|
|
||||||
errors = null;
|
|
||||||
makePost = function(postNode) {
|
|
||||||
var err;
|
|
||||||
try {
|
try {
|
||||||
return posts.push(new Post(postNode, thread, board));
|
if (condition) {
|
||||||
|
feature.ready();
|
||||||
|
}
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
err = _error;
|
err = _error;
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
errors = [];
|
errors = [];
|
||||||
}
|
}
|
||||||
return errors.push({
|
errors.push({
|
||||||
message: "Parsing of Post No." + thread.ID + " failed. Post will be skipped.",
|
message: "Failed to reconnect feature " + name + ".",
|
||||||
error: err
|
error: err
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
|
||||||
makePost($('.opContainer', threadRoot));
|
|
||||||
for (_i = 0, _len = data.length; _i < _len; _i++) {
|
|
||||||
obj = data[_i];
|
|
||||||
nodes.push(post = Build.postFromObject(obj, board));
|
|
||||||
makePost(post);
|
|
||||||
}
|
}
|
||||||
if (errors) {
|
if (errors) {
|
||||||
Main.handleErrors(errors);
|
Main.handleErrors(errors);
|
||||||
}
|
}
|
||||||
$.nodes(Navigate.nodes = nodes);
|
return QR.generatePostableThreadsList();
|
||||||
Main.callbackNodes(Thread, [thread]);
|
|
||||||
return Main.callbackNodes(Post, posts);
|
|
||||||
},
|
},
|
||||||
buildThread: function() {
|
updateContext: function(view) {
|
||||||
var board;
|
$.rmClass(doc, g.VIEW);
|
||||||
board = $('.board');
|
$.addClass(doc, view);
|
||||||
$.rmAll(board);
|
g.VIEW = view;
|
||||||
return $.add(board, Navigate.nodes);
|
switch (view) {
|
||||||
},
|
case 'index':
|
||||||
popstate: function() {
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return Navigate.popstate = function() {
|
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
||||||
var a;
|
case 'thread':
|
||||||
a = $.el('a', {
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
href: window.location,
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
id: 'popState'
|
}
|
||||||
});
|
|
||||||
return Navigate.navigate.call(a);
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
updateBoard: function(boardID) {
|
updateBoard: function(boardID) {
|
||||||
var onload, req;
|
var onload, req;
|
||||||
@ -12064,6 +11974,137 @@
|
|||||||
}
|
}
|
||||||
return $('.boardTitle').textContent = d.title = "/" + board + "/ - " + title;
|
return $('.boardTitle').textContent = d.title = "/" + board + "/ - " + title;
|
||||||
},
|
},
|
||||||
|
navigate: function(e) {
|
||||||
|
var boardID, hash, onload, path, threadID, view;
|
||||||
|
if (this.hostname !== 'boards.4chan.org' || window.location.hostname === 'rs.4chan.org') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = this.pathname.split('/');
|
||||||
|
hash = this.hash;
|
||||||
|
if (path[0] === '') {
|
||||||
|
path.shift();
|
||||||
|
}
|
||||||
|
boardID = path[0], view = path[1], threadID = path[2];
|
||||||
|
if (view === 'catalog' || ('f' === boardID || 'f' === g.BOARD.ID)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
if (this.id !== 'popState') {
|
||||||
|
history.pushState(null, '', this.pathname);
|
||||||
|
}
|
||||||
|
view = threadID ? 'thread' : view || 'index';
|
||||||
|
if (view !== g.VIEW) {
|
||||||
|
Navigate.disconnect();
|
||||||
|
Navigate.clean();
|
||||||
|
Navigate.updateContext(view);
|
||||||
|
Navigate.reconnect();
|
||||||
|
}
|
||||||
|
if (view === 'index') {
|
||||||
|
if (boardID === g.BOARD.ID) {
|
||||||
|
d.title = $('.boardTitle').textContent;
|
||||||
|
} else {
|
||||||
|
Navigate.updateBoard(boardID);
|
||||||
|
}
|
||||||
|
return Index.update();
|
||||||
|
} else {
|
||||||
|
onload = function(e) {
|
||||||
|
return Navigate.load(e, hash);
|
||||||
|
};
|
||||||
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
||||||
|
onabort: onload,
|
||||||
|
onloadend: onload
|
||||||
|
});
|
||||||
|
return setTimeout((function() {
|
||||||
|
if (Navigate.req && !Navigate.notice) {
|
||||||
|
return Navigate.notice = new Notice('info', 'Loading thread...');
|
||||||
|
}
|
||||||
|
}), 3 * $.SECOND);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
load: function(e) {
|
||||||
|
var err, notice, req;
|
||||||
|
$.rmClass(Index.button, 'fa-spin');
|
||||||
|
req = Navigate.req, notice = Navigate.notice;
|
||||||
|
delete Navigate.req;
|
||||||
|
delete Navigate.notice;
|
||||||
|
if (e.type === 'abort') {
|
||||||
|
req.onloadend = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (req.status === 200) {
|
||||||
|
return Navigate.parse(JSON.parse(req.response).posts);
|
||||||
|
}
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
console.error('Navigate failure:');
|
||||||
|
console.log(err);
|
||||||
|
if (notice) {
|
||||||
|
notice.setType('error');
|
||||||
|
notice.el.lastElementChild.textContent = 'Navigation Failed.';
|
||||||
|
setTimeout(notice.close, 2 * $.SECOND);
|
||||||
|
} else {
|
||||||
|
new Notice('error', 'Navigation Failed.', 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
parse: function(data) {
|
||||||
|
var OP, board, errors, makePost, nodes, obj, post, posts, thread, threadRoot, _i, _len;
|
||||||
|
board = g.BOARD;
|
||||||
|
threadRoot = Build.thread(board, OP = data.shift(), true);
|
||||||
|
thread = new Thread(OP.no, board);
|
||||||
|
nodes = [threadRoot];
|
||||||
|
posts = [];
|
||||||
|
errors = null;
|
||||||
|
makePost = function(postNode) {
|
||||||
|
var err;
|
||||||
|
try {
|
||||||
|
return posts.push(new Post(postNode, thread, board));
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
if (!errors) {
|
||||||
|
errors = [];
|
||||||
|
}
|
||||||
|
return errors.push({
|
||||||
|
message: "Parsing of Post No." + thread.ID + " failed. Post will be skipped.",
|
||||||
|
error: err
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
makePost($('.opContainer', threadRoot));
|
||||||
|
for (_i = 0, _len = data.length; _i < _len; _i++) {
|
||||||
|
obj = data[_i];
|
||||||
|
nodes.push(post = Build.postFromObject(obj, board));
|
||||||
|
makePost(post);
|
||||||
|
}
|
||||||
|
if (errors) {
|
||||||
|
Main.handleErrors(errors);
|
||||||
|
}
|
||||||
|
$.nodes(Navigate.nodes = nodes);
|
||||||
|
Main.callbackNodes(Thread, [thread]);
|
||||||
|
Main.callbackNodes(Post, posts);
|
||||||
|
Navigate.ready();
|
||||||
|
Navigate.buildThread();
|
||||||
|
return Header.scrollToIfNeeded($('.board'));
|
||||||
|
},
|
||||||
|
buildThread: function() {
|
||||||
|
var board;
|
||||||
|
board = $('.board');
|
||||||
|
$.rmAll(board);
|
||||||
|
return $.add(board, Navigate.nodes);
|
||||||
|
},
|
||||||
|
popstate: function() {
|
||||||
|
return Navigate.popstate = function() {
|
||||||
|
var a;
|
||||||
|
a = $.el('a', {
|
||||||
|
href: window.location,
|
||||||
|
id: 'popState'
|
||||||
|
});
|
||||||
|
return Navigate.navigate.call(a);
|
||||||
|
};
|
||||||
|
},
|
||||||
refresh: function(context) {
|
refresh: function(context) {
|
||||||
var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1;
|
var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -35,10 +35,11 @@ Navigate =
|
|||||||
$.rmAll $ '.board'
|
$.rmAll $ '.board'
|
||||||
|
|
||||||
threadFeatures: [
|
threadFeatures: [
|
||||||
['Unread Count', Unread]
|
['Unread Count', Unread]
|
||||||
['Quote Threading', QuoteThreading]
|
['Quote Threading', QuoteThreading]
|
||||||
['Thread Stats', ThreadStats]
|
['Thread Stats', ThreadStats]
|
||||||
['Thread Updater', ThreadUpdater]
|
['Thread Updater', ThreadUpdater]
|
||||||
|
['Thread Expansion', ExpandThread]
|
||||||
]
|
]
|
||||||
|
|
||||||
disconnect: ->
|
disconnect: ->
|
||||||
@ -75,15 +76,73 @@ Navigate =
|
|||||||
message: "Failed to reconnect feature #{name}."
|
message: "Failed to reconnect feature #{name}."
|
||||||
error: err
|
error: err
|
||||||
|
|
||||||
Main.handleErrors errors if errors
|
Main.handleErrors errors if errors
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
ready: ->
|
||||||
|
features = [
|
||||||
|
['Unread Count', Unread, Conf['Unread Count']]
|
||||||
|
['Quote Threading', QuoteThreading, Conf['Quote Threading'] and not Conf['Unread Count']]
|
||||||
|
]
|
||||||
|
|
||||||
|
for [name, feature, condition] in features
|
||||||
|
try
|
||||||
|
feature.ready() if condition
|
||||||
|
catch err
|
||||||
|
errors = [] unless errors
|
||||||
|
errors.push
|
||||||
|
message: "Failed to reconnect feature #{name}."
|
||||||
|
error: err
|
||||||
|
|
||||||
|
Main.handleErrors errors if errors
|
||||||
|
QR.generatePostableThreadsList()
|
||||||
|
|
||||||
updateContext: (view) ->
|
updateContext: (view) ->
|
||||||
$.rmClass doc, g.VIEW
|
$.rmClass doc, g.VIEW
|
||||||
$.addClass doc, view
|
$.addClass doc, view
|
||||||
g.VIEW = view
|
g.VIEW = view
|
||||||
|
|
||||||
|
switch view
|
||||||
|
when 'index'
|
||||||
|
$.off d, 'ThreadUpdate', QR.statusCheck
|
||||||
|
$.on d, 'indexRefresh', QR.generatePostableThreadsList
|
||||||
|
when 'thread'
|
||||||
|
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||||
|
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
|
|
||||||
|
updateBoard: (boardID) ->
|
||||||
|
g.BOARD = new Board boardID
|
||||||
|
|
||||||
|
req = null
|
||||||
|
|
||||||
|
onload = (e) ->
|
||||||
|
if e.type is 'abort'
|
||||||
|
req.onloadend = null
|
||||||
|
return
|
||||||
|
|
||||||
|
return unless req.status is 200
|
||||||
|
|
||||||
|
try
|
||||||
|
for board in JSON.parse(req.response).boards
|
||||||
|
return Navigate.updateTitle board if board.board is boardID
|
||||||
|
|
||||||
|
catch err
|
||||||
|
Main.handleErrors [
|
||||||
|
message: "Navigation failed to update board name."
|
||||||
|
error: err
|
||||||
|
]
|
||||||
|
|
||||||
|
Header.setBoardList()
|
||||||
|
|
||||||
|
req = $.ajax '//a.4cdn.org/boards.json',
|
||||||
|
onabort: onload
|
||||||
|
onloadend: onload
|
||||||
|
|
||||||
|
updateTitle: ({board, title}) ->
|
||||||
|
$.rm subtitle if subtitle = $ '.boardSubtitle'
|
||||||
|
$('.boardTitle').textContent = d.title = "/#{board}/ - #{title}"
|
||||||
|
|
||||||
navigate: (e) ->
|
navigate: (e) ->
|
||||||
return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org'
|
return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org'
|
||||||
|
|
||||||
@ -122,6 +181,11 @@ Navigate =
|
|||||||
onabort: onload
|
onabort: onload
|
||||||
onloadend: onload
|
onloadend: onload
|
||||||
|
|
||||||
|
setTimeout (->
|
||||||
|
if Navigate.req and !Navigate.notice
|
||||||
|
Navigate.notice = new Notice 'info', 'Loading thread...'
|
||||||
|
), 3 * $.SECOND
|
||||||
|
|
||||||
# Navigate.refresh {boardID, view, threadID}
|
# Navigate.refresh {boardID, view, threadID}
|
||||||
|
|
||||||
load: (e) ->
|
load: (e) ->
|
||||||
@ -137,8 +201,6 @@ Navigate =
|
|||||||
try
|
try
|
||||||
if req.status is 200
|
if req.status is 200
|
||||||
Navigate.parse JSON.parse(req.response).posts
|
Navigate.parse JSON.parse(req.response).posts
|
||||||
$.on d, '4chanXInitFinished', Navigate.finish
|
|
||||||
$.event '4chanXInitFinished'
|
|
||||||
catch err
|
catch err
|
||||||
console.error 'Navigate failure:'
|
console.error 'Navigate failure:'
|
||||||
console.log err
|
console.log err
|
||||||
@ -150,11 +212,6 @@ Navigate =
|
|||||||
else
|
else
|
||||||
new Notice 'error', 'Navigation Failed.', 2
|
new Notice 'error', 'Navigation Failed.', 2
|
||||||
return
|
return
|
||||||
|
|
||||||
finish: ->
|
|
||||||
$.off d, '4chanXInitFinished', Navigate.finish
|
|
||||||
Navigate.buildThread()
|
|
||||||
Header.scrollToIfNeeded $ '.board'
|
|
||||||
|
|
||||||
parse: (data) ->
|
parse: (data) ->
|
||||||
board = g.BOARD
|
board = g.BOARD
|
||||||
@ -188,6 +245,11 @@ Navigate =
|
|||||||
Main.callbackNodes Thread, [thread]
|
Main.callbackNodes Thread, [thread]
|
||||||
Main.callbackNodes Post, posts
|
Main.callbackNodes Post, posts
|
||||||
|
|
||||||
|
Navigate.ready()
|
||||||
|
|
||||||
|
Navigate.buildThread()
|
||||||
|
Header.scrollToIfNeeded $ '.board'
|
||||||
|
|
||||||
buildThread: ->
|
buildThread: ->
|
||||||
board = $ '.board'
|
board = $ '.board'
|
||||||
$.rmAll board
|
$.rmAll board
|
||||||
@ -200,38 +262,6 @@ Navigate =
|
|||||||
|
|
||||||
Navigate.navigate.call a
|
Navigate.navigate.call a
|
||||||
|
|
||||||
updateBoard: (boardID) ->
|
|
||||||
g.BOARD = new Board boardID
|
|
||||||
|
|
||||||
req = null
|
|
||||||
|
|
||||||
onload = (e) ->
|
|
||||||
if e.type is 'abort'
|
|
||||||
req.onloadend = null
|
|
||||||
return
|
|
||||||
|
|
||||||
return unless req.status is 200
|
|
||||||
|
|
||||||
try
|
|
||||||
for board in JSON.parse(req.response).boards
|
|
||||||
return Navigate.updateTitle board if board.board is boardID
|
|
||||||
|
|
||||||
catch err
|
|
||||||
Main.handleErrors [
|
|
||||||
message: "Navigation failed to update board name."
|
|
||||||
error: err
|
|
||||||
]
|
|
||||||
|
|
||||||
Header.setBoardList()
|
|
||||||
|
|
||||||
req = $.ajax '//a.4cdn.org/boards.json',
|
|
||||||
onabort: onload
|
|
||||||
onloadend: onload
|
|
||||||
|
|
||||||
updateTitle: ({board, title}) ->
|
|
||||||
$.rm subtitle if subtitle = $ '.boardSubtitle'
|
|
||||||
$('.boardTitle').textContent = d.title = "/#{board}/ - #{title}"
|
|
||||||
|
|
||||||
refresh: (context) ->
|
refresh: (context) ->
|
||||||
return
|
return
|
||||||
{boardID, view, threadID} = context
|
{boardID, view, threadID} = context
|
||||||
|
|||||||
@ -1,18 +1,23 @@
|
|||||||
ExpandThread =
|
ExpandThread =
|
||||||
|
statuses: {}
|
||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW isnt 'index' or !Conf['Thread Expansion']
|
return if g.VIEW is 'thread' or !Conf['Thread Expansion']
|
||||||
@statuses = {}
|
|
||||||
$.on d, 'IndexRefresh', @onIndexRefresh
|
$.on d, 'IndexRefresh', @onIndexRefresh
|
||||||
|
|
||||||
setButton: (thread) ->
|
setButton: (thread) ->
|
||||||
return unless a = $.x 'following-sibling::a[contains(@class,"summary")][1]', thread.OP.nodes.root
|
return unless a = $.x 'following-sibling::a[contains(@class,"summary")][1]', thread.OP.nodes.root
|
||||||
a.textContent = ExpandThread.text '+', a.textContent.match(/\d+/g)...
|
a.textContent = ExpandThread.text '+', a.textContent.match(/\d+/g)...
|
||||||
$.on a, 'click', ExpandThread.cbToggle
|
$.on a, 'click', ExpandThread.cbToggle
|
||||||
|
|
||||||
onIndexRefresh: ->
|
disconnect: (refresh) ->
|
||||||
for threadID, status of ExpandThread.statuses
|
for threadID, status of ExpandThread.statuses
|
||||||
status.req?.abort()
|
status.req?.abort()
|
||||||
delete ExpandThread.statuses[threadID]
|
delete ExpandThread.statuses[threadID]
|
||||||
|
|
||||||
|
$.off d, 'IndexRefresh', @onIndexRefresh unless refresh
|
||||||
|
|
||||||
|
onIndexRefresh: ->
|
||||||
|
ExpandThread.disconnect true
|
||||||
for threadID, thread of g.BOARD.threads
|
for threadID, thread of g.BOARD.threads
|
||||||
ExpandThread.setButton thread
|
ExpandThread.setButton thread
|
||||||
return
|
return
|
||||||
|
|||||||
@ -18,7 +18,7 @@ QuoteThreading =
|
|||||||
el: @controls
|
el: @controls
|
||||||
order: 98
|
order: 98
|
||||||
|
|
||||||
$.on d, '4chanXInitFinished', @setup unless Conf['Unread Count']
|
$.on d, '4chanXInitFinished', @ready unless Conf['Unread Count']
|
||||||
|
|
||||||
Post.callbacks.push
|
Post.callbacks.push
|
||||||
name: 'Quote Threading'
|
name: 'Quote Threading'
|
||||||
@ -36,8 +36,8 @@ QuoteThreading =
|
|||||||
|
|
||||||
Post.callbacks.disconnect 'Quote Threading'
|
Post.callbacks.disconnect 'Quote Threading'
|
||||||
|
|
||||||
setup: ->
|
ready: ->
|
||||||
$.off d, '4chanXInitFinished', QuoteThreading.setup
|
$.off d, '4chanXInitFinished', QuoteThreading.ready
|
||||||
QuoteThreading.force()
|
QuoteThreading.force()
|
||||||
|
|
||||||
force: ->
|
force: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user