Merge branch 'v3'
Conflicts: CHANGELOG.md LICENSE builds/4chan-X.js builds/4chan-X.meta.js builds/4chan-X.user.js builds/crx/manifest.json builds/crx/script.js latest.js package.json src/General/Config.coffee src/General/Main.coffee src/General/css/style.css src/Posting/QuickReply.coffee
This commit is contained in:
commit
7ef6aa71fd
19
CHANGELOG.md
19
CHANGELOG.md
@ -1,6 +1,23 @@
|
|||||||
|
**MayhemYDG**:
|
||||||
|
- Tiny fixes
|
||||||
|
|
||||||
|
**seaweedchan**:
|
||||||
|
- New image expansion option: `Advance on contract`. Advances to next post unless Fappe Tyme is enabled (temporary)
|
||||||
|
- Change `.qr-link` to `.qr-link-container` and `.qr-link>a` to `.qr-link`
|
||||||
|
- Update /q/'s posting cooldown
|
||||||
|
- Make "___ omitted. Click here to view." text change when thread is expanded.
|
||||||
|
- Restrict "Reply to Thread" click event to the link itself
|
||||||
|
- Fix Nyafuu being undefined
|
||||||
|
- New option `Captcha Warning Notifications`
|
||||||
|
- When disabled, shows a red border around the captcha to indicate captcha errors. Goes back to normal when any key is pressed.
|
||||||
|
- Color Quick Reply's inputs in Tomorrow to match the theme
|
||||||
|
- Revert some of Mayhem's changes that caused new bugs
|
||||||
|
|
||||||
|
**Wohlfe**:
|
||||||
|
- Add /pol/ archiving for FoolzaShit
|
||||||
|
|
||||||
### v2.0.4
|
### v2.0.4
|
||||||
*2013-05-15*
|
*2013-05-15*
|
||||||
|
|
||||||
**MayhemYDG**:
|
**MayhemYDG**:
|
||||||
- Add new archive selection
|
- Add new archive selection
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.4 - 2013-05-15
|
* appchan x - Version 2.0.4 - 2013-05-20
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.4 - 2013-05-15
|
* appchan x - Version 2.0.4 - 2013-05-20
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -227,7 +227,8 @@
|
|||||||
'Fit width': [true, ''],
|
'Fit width': [true, ''],
|
||||||
'Fit height': [false, ''],
|
'Fit height': [false, ''],
|
||||||
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
||||||
'Expand from here': [true, 'Expand all images only from current position to thread end.']
|
'Expand from here': [true, 'Expand all images only from current position to thread end.'],
|
||||||
|
'Advance on contract': [false, 'Advance to next post when contracting an expanded image.']
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
Interface: {
|
Interface: {
|
||||||
@ -2756,7 +2757,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.ajax = function(url, callbacks, opts) {
|
$.ajax = function(url, callbacks, opts) {
|
||||||
var cred, form, headers, key, r, sync, type, upCallbacks, val;
|
var cred, err, form, headers, key, r, sync, type, upCallbacks, val;
|
||||||
|
|
||||||
if (opts == null) {
|
if (opts == null) {
|
||||||
opts = {};
|
opts = {};
|
||||||
@ -2772,7 +2773,11 @@
|
|||||||
}
|
}
|
||||||
$.extend(r, callbacks);
|
$.extend(r, callbacks);
|
||||||
$.extend(r.upload, upCallbacks);
|
$.extend(r.upload, upCallbacks);
|
||||||
r.withCredentials = cred;
|
try {
|
||||||
|
r.withCredentials = cred;
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
}
|
||||||
r.send(form);
|
r.send(form);
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -2782,11 +2787,11 @@
|
|||||||
|
|
||||||
reqs = {};
|
reqs = {};
|
||||||
return function(url, cb) {
|
return function(url, cb) {
|
||||||
var req, rm;
|
var err, req, rm;
|
||||||
|
|
||||||
if (req = reqs[url]) {
|
if (req = reqs[url]) {
|
||||||
if (req.readyState === 4) {
|
if (req.readyState === 4) {
|
||||||
cb.call(req);
|
cb.call(req, req.evt);
|
||||||
} else {
|
} else {
|
||||||
req.callbacks.push(cb);
|
req.callbacks.push(cb);
|
||||||
}
|
}
|
||||||
@ -2795,20 +2800,26 @@
|
|||||||
rm = function() {
|
rm = function() {
|
||||||
return delete reqs[url];
|
return delete reqs[url];
|
||||||
};
|
};
|
||||||
req = $.ajax(url, {
|
try {
|
||||||
onload: function(e) {
|
req = $.ajax(url, {
|
||||||
var _i, _len, _ref;
|
onload: function(e) {
|
||||||
|
var _i, _len, _ref;
|
||||||
|
|
||||||
_ref = this.callbacks;
|
_ref = this.callbacks;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
cb = _ref[_i];
|
cb = _ref[_i];
|
||||||
cb.call(this, e);
|
cb.call(this, e);
|
||||||
}
|
}
|
||||||
return delete this.callbacks;
|
this.evt = e;
|
||||||
},
|
return delete this.callbacks;
|
||||||
onabort: rm,
|
},
|
||||||
onerror: rm
|
onabort: rm,
|
||||||
});
|
onerror: rm
|
||||||
|
});
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
return;
|
||||||
|
}
|
||||||
req.callbacks = [cb];
|
req.callbacks = [cb];
|
||||||
return reqs[url] = req;
|
return reqs[url] = req;
|
||||||
};
|
};
|
||||||
@ -3628,7 +3639,7 @@
|
|||||||
_ref = this.data.boards;
|
_ref = this.data.boards;
|
||||||
for (boardID in _ref) {
|
for (boardID in _ref) {
|
||||||
val = _ref[boardID];
|
val = _ref[boardID];
|
||||||
if (!val) {
|
if (typeof this.data.boards[boardID] !== 'object') {
|
||||||
delete this.data.boards[boardID];
|
delete this.data.boards[boardID];
|
||||||
} else {
|
} else {
|
||||||
this.deleteIfEmpty({
|
this.deleteIfEmpty({
|
||||||
@ -4325,7 +4336,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clone = post.addClone(context);
|
clone = post.addClone(context);
|
||||||
Main.callbackNodes(Post, [clone]);
|
Main.callbackNodes(Clone, [clone]);
|
||||||
nodes = clone.nodes;
|
nodes = clone.nodes;
|
||||||
$.rmAll(nodes.root);
|
$.rmAll(nodes.root);
|
||||||
$.add(nodes.root, nodes.post);
|
$.add(nodes.root, nodes.post);
|
||||||
@ -7196,7 +7207,7 @@
|
|||||||
})(),
|
})(),
|
||||||
sage: board === 'q' ? 600 : 60,
|
sage: board === 'q' ? 600 : 60,
|
||||||
file: board === 'q' ? 300 : 30,
|
file: board === 'q' ? 300 : 30,
|
||||||
post: board === 'q' ? 60 : 30
|
post: board === 'q' ? 150 : 30
|
||||||
};
|
};
|
||||||
QR.cooldown.upSpd = 0;
|
QR.cooldown.upSpd = 0;
|
||||||
QR.cooldown.upSpdAccuracy = .5;
|
QR.cooldown.upSpdAccuracy = .5;
|
||||||
@ -8471,7 +8482,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImageExpand.contract(post);
|
ImageExpand.contract(post);
|
||||||
rect = post.nodes.root.getBoundingClientRect();
|
rect = Conf['Advance on contract'] && !($.hasClass(doc, 'fappeTyme')) ? post.nodes.root.nextSibling.getBoundingClientRect() : post.nodes.root.getBoundingClientRect();
|
||||||
if (!(rect.top <= 0 || rect.left <= 0)) {
|
if (!(rect.top <= 0 || rect.left <= 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -8915,7 +8926,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var node;
|
var node;
|
||||||
|
|
||||||
if (post.isDead) {
|
if (post.isDead || post.board.ID === 'q') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DeleteLink.post = post;
|
DeleteLink.post = post;
|
||||||
@ -8991,7 +9002,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteLink.cooldown.counting = post;
|
DeleteLink.cooldown.counting = post;
|
||||||
length = post.board.ID === 'q' ? 600 : 30;
|
length = 30;
|
||||||
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
||||||
return DeleteLink.cooldown.count(post, seconds, length, node);
|
return DeleteLink.cooldown.count(post, seconds, length, node);
|
||||||
},
|
},
|
||||||
@ -10133,6 +10144,7 @@
|
|||||||
'files': ['hr', 'tg', 'tv', 'x']
|
'files': ['hr', 'tg', 'tv', 'x']
|
||||||
},
|
},
|
||||||
'Nyafuu': {
|
'Nyafuu': {
|
||||||
|
'domain': 'archive.nyafuu.org',
|
||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
@ -10159,7 +10171,7 @@
|
|||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'],
|
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y'],
|
||||||
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
||||||
},
|
},
|
||||||
'Install Gentoo': {
|
'Install Gentoo': {
|
||||||
@ -10182,8 +10194,8 @@
|
|||||||
'domain': 'archive.heinessen.com',
|
'domain': 'archive.heinessen.com',
|
||||||
'http': true,
|
'http': true,
|
||||||
'software': 'fuuka',
|
'software': 'fuuka',
|
||||||
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy', 'x'],
|
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
|
||||||
'files': ['an', 'k', 'toy', 'x']
|
'files': ['an', 'k', 'toy']
|
||||||
},
|
},
|
||||||
'warosu': {
|
'warosu': {
|
||||||
'domain': 'fuuka.warosu.org',
|
'domain': 'fuuka.warosu.org',
|
||||||
@ -12332,7 +12344,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = 'loading';
|
thread.isExpanded = 'loading';
|
||||||
a.textContent = a.textContent.replace('+', '× Loading...');
|
a.textContent = a.textContent.replace('+', '...');
|
||||||
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
||||||
return ExpandThread.parse(this, thread, a);
|
return ExpandThread.parse(this, thread, a);
|
||||||
});
|
});
|
||||||
@ -12342,12 +12354,12 @@
|
|||||||
if (!a) {
|
if (!a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
a.textContent = a.textContent.replace('× Loading...', '+');
|
a.textContent = a.textContent.replace('...', '+');
|
||||||
break;
|
break;
|
||||||
case true:
|
case true:
|
||||||
thread.isExpanded = false;
|
thread.isExpanded = false;
|
||||||
if (a) {
|
if (a) {
|
||||||
a.textContent = a.textContent.replace('-', '+');
|
a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12395,7 +12407,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = true;
|
thread.isExpanded = true;
|
||||||
a.textContent = a.textContent.replace('× Loading...', '-');
|
a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
|
||||||
posts = JSON.parse(req.response).posts;
|
posts = JSON.parse(req.response).posts;
|
||||||
if (spoilerRange = posts[0].custom_spoiler) {
|
if (spoilerRange = posts[0].custom_spoiler) {
|
||||||
Build.spoilerRange[g.BOARD] = spoilerRange;
|
Build.spoilerRange[g.BOARD] = spoilerRange;
|
||||||
@ -14519,12 +14531,12 @@
|
|||||||
return $.get(Conf, Main.initFeatures);
|
return $.get(Conf, Main.initFeatures);
|
||||||
},
|
},
|
||||||
initFeatures: function(items) {
|
initFeatures: function(items) {
|
||||||
var init, pathname;
|
var init, pathname, _ref;
|
||||||
|
|
||||||
Conf = items;
|
Conf = items;
|
||||||
pathname = location.pathname.split('/');
|
pathname = location.pathname.split('/');
|
||||||
g.BOARD = new Board(pathname[1]);
|
g.BOARD = new Board(pathname[1]);
|
||||||
if (g.BOARD.ID === 'z') {
|
if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g.VIEW = (function() {
|
g.VIEW = (function() {
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.4 - 2013-05-15
|
* appchan x - Version 2.0.4 - 2013-05-20
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -228,7 +228,8 @@
|
|||||||
'Fit width': [true, ''],
|
'Fit width': [true, ''],
|
||||||
'Fit height': [false, ''],
|
'Fit height': [false, ''],
|
||||||
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
||||||
'Expand from here': [true, 'Expand all images only from current position to thread end.']
|
'Expand from here': [true, 'Expand all images only from current position to thread end.'],
|
||||||
|
'Advance on contract': [false, 'Advance to next post when contracting an expanded image.']
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
Interface: {
|
Interface: {
|
||||||
@ -2753,7 +2754,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.ajax = function(url, callbacks, opts) {
|
$.ajax = function(url, callbacks, opts) {
|
||||||
var cred, form, headers, key, r, sync, type, upCallbacks, val;
|
var cred, err, form, headers, key, r, sync, type, upCallbacks, val;
|
||||||
|
|
||||||
if (opts == null) {
|
if (opts == null) {
|
||||||
opts = {};
|
opts = {};
|
||||||
@ -2769,7 +2770,11 @@
|
|||||||
}
|
}
|
||||||
$.extend(r, callbacks);
|
$.extend(r, callbacks);
|
||||||
$.extend(r.upload, upCallbacks);
|
$.extend(r.upload, upCallbacks);
|
||||||
r.withCredentials = cred;
|
try {
|
||||||
|
r.withCredentials = cred;
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
}
|
||||||
r.send(form);
|
r.send(form);
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -2779,11 +2784,11 @@
|
|||||||
|
|
||||||
reqs = {};
|
reqs = {};
|
||||||
return function(url, cb) {
|
return function(url, cb) {
|
||||||
var req, rm;
|
var err, req, rm;
|
||||||
|
|
||||||
if (req = reqs[url]) {
|
if (req = reqs[url]) {
|
||||||
if (req.readyState === 4) {
|
if (req.readyState === 4) {
|
||||||
cb.call(req);
|
cb.call(req, req.evt);
|
||||||
} else {
|
} else {
|
||||||
req.callbacks.push(cb);
|
req.callbacks.push(cb);
|
||||||
}
|
}
|
||||||
@ -2792,20 +2797,26 @@
|
|||||||
rm = function() {
|
rm = function() {
|
||||||
return delete reqs[url];
|
return delete reqs[url];
|
||||||
};
|
};
|
||||||
req = $.ajax(url, {
|
try {
|
||||||
onload: function(e) {
|
req = $.ajax(url, {
|
||||||
var _i, _len, _ref;
|
onload: function(e) {
|
||||||
|
var _i, _len, _ref;
|
||||||
|
|
||||||
_ref = this.callbacks;
|
_ref = this.callbacks;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
cb = _ref[_i];
|
cb = _ref[_i];
|
||||||
cb.call(this, e);
|
cb.call(this, e);
|
||||||
}
|
}
|
||||||
return delete this.callbacks;
|
this.evt = e;
|
||||||
},
|
return delete this.callbacks;
|
||||||
onabort: rm,
|
},
|
||||||
onerror: rm
|
onabort: rm,
|
||||||
});
|
onerror: rm
|
||||||
|
});
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
return;
|
||||||
|
}
|
||||||
req.callbacks = [cb];
|
req.callbacks = [cb];
|
||||||
return reqs[url] = req;
|
return reqs[url] = req;
|
||||||
};
|
};
|
||||||
@ -3624,7 +3635,7 @@
|
|||||||
_ref = this.data.boards;
|
_ref = this.data.boards;
|
||||||
for (boardID in _ref) {
|
for (boardID in _ref) {
|
||||||
val = _ref[boardID];
|
val = _ref[boardID];
|
||||||
if (!val) {
|
if (typeof this.data.boards[boardID] !== 'object') {
|
||||||
delete this.data.boards[boardID];
|
delete this.data.boards[boardID];
|
||||||
} else {
|
} else {
|
||||||
this.deleteIfEmpty({
|
this.deleteIfEmpty({
|
||||||
@ -4321,7 +4332,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clone = post.addClone(context);
|
clone = post.addClone(context);
|
||||||
Main.callbackNodes(Post, [clone]);
|
Main.callbackNodes(Clone, [clone]);
|
||||||
nodes = clone.nodes;
|
nodes = clone.nodes;
|
||||||
$.rmAll(nodes.root);
|
$.rmAll(nodes.root);
|
||||||
$.add(nodes.root, nodes.post);
|
$.add(nodes.root, nodes.post);
|
||||||
@ -7180,7 +7191,7 @@
|
|||||||
})(),
|
})(),
|
||||||
sage: board === 'q' ? 600 : 60,
|
sage: board === 'q' ? 600 : 60,
|
||||||
file: board === 'q' ? 300 : 30,
|
file: board === 'q' ? 300 : 30,
|
||||||
post: board === 'q' ? 60 : 30
|
post: board === 'q' ? 150 : 30
|
||||||
};
|
};
|
||||||
QR.cooldown.upSpd = 0;
|
QR.cooldown.upSpd = 0;
|
||||||
QR.cooldown.upSpdAccuracy = .5;
|
QR.cooldown.upSpdAccuracy = .5;
|
||||||
@ -8480,7 +8491,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImageExpand.contract(post);
|
ImageExpand.contract(post);
|
||||||
rect = post.nodes.root.getBoundingClientRect();
|
rect = Conf['Advance on contract'] && !($.hasClass(doc, 'fappeTyme')) ? post.nodes.root.nextSibling.getBoundingClientRect() : post.nodes.root.getBoundingClientRect();
|
||||||
if (!(rect.top <= 0 || rect.left <= 0)) {
|
if (!(rect.top <= 0 || rect.left <= 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -8924,7 +8935,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var node;
|
var node;
|
||||||
|
|
||||||
if (post.isDead) {
|
if (post.isDead || post.board.ID === 'q') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DeleteLink.post = post;
|
DeleteLink.post = post;
|
||||||
@ -9000,7 +9011,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteLink.cooldown.counting = post;
|
DeleteLink.cooldown.counting = post;
|
||||||
length = post.board.ID === 'q' ? 600 : 30;
|
length = 30;
|
||||||
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
||||||
return DeleteLink.cooldown.count(post, seconds, length, node);
|
return DeleteLink.cooldown.count(post, seconds, length, node);
|
||||||
},
|
},
|
||||||
@ -10142,6 +10153,7 @@
|
|||||||
'files': ['hr', 'tg', 'tv', 'x']
|
'files': ['hr', 'tg', 'tv', 'x']
|
||||||
},
|
},
|
||||||
'Nyafuu': {
|
'Nyafuu': {
|
||||||
|
'domain': 'archive.nyafuu.org',
|
||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
@ -10168,7 +10180,7 @@
|
|||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'],
|
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y'],
|
||||||
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
||||||
},
|
},
|
||||||
'Install Gentoo': {
|
'Install Gentoo': {
|
||||||
@ -10191,8 +10203,8 @@
|
|||||||
'domain': 'archive.heinessen.com',
|
'domain': 'archive.heinessen.com',
|
||||||
'http': true,
|
'http': true,
|
||||||
'software': 'fuuka',
|
'software': 'fuuka',
|
||||||
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy', 'x'],
|
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
|
||||||
'files': ['an', 'k', 'toy', 'x']
|
'files': ['an', 'k', 'toy']
|
||||||
},
|
},
|
||||||
'warosu': {
|
'warosu': {
|
||||||
'domain': 'fuuka.warosu.org',
|
'domain': 'fuuka.warosu.org',
|
||||||
@ -12341,7 +12353,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = 'loading';
|
thread.isExpanded = 'loading';
|
||||||
a.textContent = a.textContent.replace('+', '× Loading...');
|
a.textContent = a.textContent.replace('+', '...');
|
||||||
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
||||||
return ExpandThread.parse(this, thread, a);
|
return ExpandThread.parse(this, thread, a);
|
||||||
});
|
});
|
||||||
@ -12351,12 +12363,12 @@
|
|||||||
if (!a) {
|
if (!a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
a.textContent = a.textContent.replace('× Loading...', '+');
|
a.textContent = a.textContent.replace('...', '+');
|
||||||
break;
|
break;
|
||||||
case true:
|
case true:
|
||||||
thread.isExpanded = false;
|
thread.isExpanded = false;
|
||||||
if (a) {
|
if (a) {
|
||||||
a.textContent = a.textContent.replace('-', '+');
|
a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12404,7 +12416,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = true;
|
thread.isExpanded = true;
|
||||||
a.textContent = a.textContent.replace('× Loading...', '-');
|
a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
|
||||||
posts = JSON.parse(req.response).posts;
|
posts = JSON.parse(req.response).posts;
|
||||||
if (spoilerRange = posts[0].custom_spoiler) {
|
if (spoilerRange = posts[0].custom_spoiler) {
|
||||||
Build.spoilerRange[g.BOARD] = spoilerRange;
|
Build.spoilerRange[g.BOARD] = spoilerRange;
|
||||||
@ -14526,12 +14538,12 @@
|
|||||||
return $.get(Conf, Main.initFeatures);
|
return $.get(Conf, Main.initFeatures);
|
||||||
},
|
},
|
||||||
initFeatures: function(items) {
|
initFeatures: function(items) {
|
||||||
var init, pathname;
|
var init, pathname, _ref;
|
||||||
|
|
||||||
Conf = items;
|
Conf = items;
|
||||||
pathname = location.pathname.split('/');
|
pathname = location.pathname.split('/');
|
||||||
g.BOARD = new Board(pathname[1]);
|
g.BOARD = new Board(pathname[1]);
|
||||||
if (g.BOARD.ID === 'z') {
|
if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g.VIEW = (function() {
|
g.VIEW = (function() {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.4 - 2013-05-15
|
* appchan x - Version 2.0.4 - 2013-05-20
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -208,7 +208,8 @@
|
|||||||
'Fit width': [true, ''],
|
'Fit width': [true, ''],
|
||||||
'Fit height': [false, ''],
|
'Fit height': [false, ''],
|
||||||
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
'Expand spoilers': [true, 'Expand all images along with spoilers.'],
|
||||||
'Expand from here': [true, 'Expand all images only from current position to thread end.']
|
'Expand from here': [true, 'Expand all images only from current position to thread end.'],
|
||||||
|
'Advance on contract': [false, 'Advance to next post when contracting an expanded image.']
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
Interface: {
|
Interface: {
|
||||||
@ -2733,7 +2734,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.ajax = function(url, callbacks, opts) {
|
$.ajax = function(url, callbacks, opts) {
|
||||||
var cred, form, headers, key, r, sync, type, upCallbacks, val;
|
var cred, err, form, headers, key, r, sync, type, upCallbacks, val;
|
||||||
|
|
||||||
if (opts == null) {
|
if (opts == null) {
|
||||||
opts = {};
|
opts = {};
|
||||||
@ -2749,7 +2750,11 @@
|
|||||||
}
|
}
|
||||||
$.extend(r, callbacks);
|
$.extend(r, callbacks);
|
||||||
$.extend(r.upload, upCallbacks);
|
$.extend(r.upload, upCallbacks);
|
||||||
r.withCredentials = cred;
|
try {
|
||||||
|
r.withCredentials = cred;
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
}
|
||||||
r.send(form);
|
r.send(form);
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -2759,11 +2764,11 @@
|
|||||||
|
|
||||||
reqs = {};
|
reqs = {};
|
||||||
return function(url, cb) {
|
return function(url, cb) {
|
||||||
var req, rm;
|
var err, req, rm;
|
||||||
|
|
||||||
if (req = reqs[url]) {
|
if (req = reqs[url]) {
|
||||||
if (req.readyState === 4) {
|
if (req.readyState === 4) {
|
||||||
cb.call(req);
|
cb.call(req, req.evt);
|
||||||
} else {
|
} else {
|
||||||
req.callbacks.push(cb);
|
req.callbacks.push(cb);
|
||||||
}
|
}
|
||||||
@ -2772,20 +2777,26 @@
|
|||||||
rm = function() {
|
rm = function() {
|
||||||
return delete reqs[url];
|
return delete reqs[url];
|
||||||
};
|
};
|
||||||
req = $.ajax(url, {
|
try {
|
||||||
onload: function(e) {
|
req = $.ajax(url, {
|
||||||
var _i, _len, _ref;
|
onload: function(e) {
|
||||||
|
var _i, _len, _ref;
|
||||||
|
|
||||||
_ref = this.callbacks;
|
_ref = this.callbacks;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
cb = _ref[_i];
|
cb = _ref[_i];
|
||||||
cb.call(this, e);
|
cb.call(this, e);
|
||||||
}
|
}
|
||||||
return delete this.callbacks;
|
this.evt = e;
|
||||||
},
|
return delete this.callbacks;
|
||||||
onabort: rm,
|
},
|
||||||
onerror: rm
|
onabort: rm,
|
||||||
});
|
onerror: rm
|
||||||
|
});
|
||||||
|
} catch (_error) {
|
||||||
|
err = _error;
|
||||||
|
return;
|
||||||
|
}
|
||||||
req.callbacks = [cb];
|
req.callbacks = [cb];
|
||||||
return reqs[url] = req;
|
return reqs[url] = req;
|
||||||
};
|
};
|
||||||
@ -3625,7 +3636,7 @@
|
|||||||
_ref = this.data.boards;
|
_ref = this.data.boards;
|
||||||
for (boardID in _ref) {
|
for (boardID in _ref) {
|
||||||
val = _ref[boardID];
|
val = _ref[boardID];
|
||||||
if (!val) {
|
if (typeof this.data.boards[boardID] !== 'object') {
|
||||||
delete this.data.boards[boardID];
|
delete this.data.boards[boardID];
|
||||||
} else {
|
} else {
|
||||||
this.deleteIfEmpty({
|
this.deleteIfEmpty({
|
||||||
@ -4322,7 +4333,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clone = post.addClone(context);
|
clone = post.addClone(context);
|
||||||
Main.callbackNodes(Post, [clone]);
|
Main.callbackNodes(Clone, [clone]);
|
||||||
nodes = clone.nodes;
|
nodes = clone.nodes;
|
||||||
$.rmAll(nodes.root);
|
$.rmAll(nodes.root);
|
||||||
$.add(nodes.root, nodes.post);
|
$.add(nodes.root, nodes.post);
|
||||||
@ -7182,7 +7193,7 @@
|
|||||||
})(),
|
})(),
|
||||||
sage: board === 'q' ? 600 : 60,
|
sage: board === 'q' ? 600 : 60,
|
||||||
file: board === 'q' ? 300 : 30,
|
file: board === 'q' ? 300 : 30,
|
||||||
post: board === 'q' ? 60 : 30
|
post: board === 'q' ? 150 : 30
|
||||||
};
|
};
|
||||||
QR.cooldown.upSpd = 0;
|
QR.cooldown.upSpd = 0;
|
||||||
QR.cooldown.upSpdAccuracy = .5;
|
QR.cooldown.upSpdAccuracy = .5;
|
||||||
@ -8457,7 +8468,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImageExpand.contract(post);
|
ImageExpand.contract(post);
|
||||||
rect = post.nodes.root.getBoundingClientRect();
|
rect = Conf['Advance on contract'] && !($.hasClass(doc, 'fappeTyme')) ? post.nodes.root.nextSibling.getBoundingClientRect() : post.nodes.root.getBoundingClientRect();
|
||||||
if (!(rect.top <= 0 || rect.left <= 0)) {
|
if (!(rect.top <= 0 || rect.left <= 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -8901,7 +8912,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var node;
|
var node;
|
||||||
|
|
||||||
if (post.isDead) {
|
if (post.isDead || post.board.ID === 'q') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DeleteLink.post = post;
|
DeleteLink.post = post;
|
||||||
@ -8977,7 +8988,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteLink.cooldown.counting = post;
|
DeleteLink.cooldown.counting = post;
|
||||||
length = post.board.ID === 'q' ? 600 : 30;
|
length = 30;
|
||||||
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND);
|
||||||
return DeleteLink.cooldown.count(post, seconds, length, node);
|
return DeleteLink.cooldown.count(post, seconds, length, node);
|
||||||
},
|
},
|
||||||
@ -10124,6 +10135,7 @@
|
|||||||
'files': ['hr', 'tg', 'tv', 'x']
|
'files': ['hr', 'tg', 'tv', 'x']
|
||||||
},
|
},
|
||||||
'Nyafuu': {
|
'Nyafuu': {
|
||||||
|
'domain': 'archive.nyafuu.org',
|
||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
@ -10150,7 +10162,7 @@
|
|||||||
'http': true,
|
'http': true,
|
||||||
'https': true,
|
'https': true,
|
||||||
'software': 'foolfuuka',
|
'software': 'foolfuuka',
|
||||||
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'],
|
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y'],
|
||||||
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
||||||
},
|
},
|
||||||
'Install Gentoo': {
|
'Install Gentoo': {
|
||||||
@ -10173,8 +10185,8 @@
|
|||||||
'domain': 'archive.heinessen.com',
|
'domain': 'archive.heinessen.com',
|
||||||
'http': true,
|
'http': true,
|
||||||
'software': 'fuuka',
|
'software': 'fuuka',
|
||||||
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy', 'x'],
|
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
|
||||||
'files': ['an', 'k', 'toy', 'x']
|
'files': ['an', 'k', 'toy']
|
||||||
},
|
},
|
||||||
'warosu': {
|
'warosu': {
|
||||||
'domain': 'fuuka.warosu.org',
|
'domain': 'fuuka.warosu.org',
|
||||||
@ -12323,7 +12335,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = 'loading';
|
thread.isExpanded = 'loading';
|
||||||
a.textContent = a.textContent.replace('+', '× Loading...');
|
a.textContent = a.textContent.replace('+', '...');
|
||||||
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
|
||||||
return ExpandThread.parse(this, thread, a);
|
return ExpandThread.parse(this, thread, a);
|
||||||
});
|
});
|
||||||
@ -12333,12 +12345,12 @@
|
|||||||
if (!a) {
|
if (!a) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
a.textContent = a.textContent.replace('× Loading...', '+');
|
a.textContent = a.textContent.replace('...', '+');
|
||||||
break;
|
break;
|
||||||
case true:
|
case true:
|
||||||
thread.isExpanded = false;
|
thread.isExpanded = false;
|
||||||
if (a) {
|
if (a) {
|
||||||
a.textContent = a.textContent.replace('-', '+');
|
a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12386,7 +12398,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thread.isExpanded = true;
|
thread.isExpanded = true;
|
||||||
a.textContent = a.textContent.replace('× Loading...', '-');
|
a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
|
||||||
posts = JSON.parse(req.response).posts;
|
posts = JSON.parse(req.response).posts;
|
||||||
if (spoilerRange = posts[0].custom_spoiler) {
|
if (spoilerRange = posts[0].custom_spoiler) {
|
||||||
Build.spoilerRange[g.BOARD] = spoilerRange;
|
Build.spoilerRange[g.BOARD] = spoilerRange;
|
||||||
@ -14510,12 +14522,12 @@
|
|||||||
return $.get(Conf, Main.initFeatures);
|
return $.get(Conf, Main.initFeatures);
|
||||||
},
|
},
|
||||||
initFeatures: function(items) {
|
initFeatures: function(items) {
|
||||||
var init, pathname;
|
var init, pathname, _ref;
|
||||||
|
|
||||||
Conf = items;
|
Conf = items;
|
||||||
pathname = location.pathname.split('/');
|
pathname = location.pathname.split('/');
|
||||||
g.BOARD = new Board(pathname[1]);
|
g.BOARD = new Board(pathname[1]);
|
||||||
if (g.BOARD.ID === 'z') {
|
if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g.VIEW = (function() {
|
g.VIEW = (function() {
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
"grunt-contrib-compress": "~0.5.0",
|
"grunt-contrib-compress": "~0.5.0",
|
||||||
"grunt-contrib-concat": "~0.3.0",
|
"grunt-contrib-concat": "~0.3.0",
|
||||||
"grunt-contrib-copy": "~0.4.1",
|
"grunt-contrib-copy": "~0.4.1",
|
||||||
"grunt-contrib-watch": "~0.4.2",
|
"grunt-contrib-watch": "~0.4.3",
|
||||||
"grunt-shell": "~0.2.2"
|
"grunt-shell": "~0.2.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@ -56,6 +56,7 @@ Redirect =
|
|||||||
'files': ['hr', 'tg', 'tv', 'x']
|
'files': ['hr', 'tg', 'tv', 'x']
|
||||||
|
|
||||||
'Nyafuu':
|
'Nyafuu':
|
||||||
|
'domain': 'archive.nyafuu.org'
|
||||||
'http': true
|
'http': true
|
||||||
'https': true
|
'https': true
|
||||||
'software': 'foolfuuka'
|
'software': 'foolfuuka'
|
||||||
@ -82,7 +83,7 @@ Redirect =
|
|||||||
'http': true
|
'http': true
|
||||||
'https': true
|
'https': true
|
||||||
'software': 'foolfuuka'
|
'software': 'foolfuuka'
|
||||||
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
'boards': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y']
|
||||||
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
'files': ['adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y']
|
||||||
|
|
||||||
'Install Gentoo':
|
'Install Gentoo':
|
||||||
@ -105,8 +106,8 @@ Redirect =
|
|||||||
'domain': 'archive.heinessen.com'
|
'domain': 'archive.heinessen.com'
|
||||||
'http': true
|
'http': true
|
||||||
'software': 'fuuka'
|
'software': 'fuuka'
|
||||||
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy', 'x']
|
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy']
|
||||||
'files': ['an', 'k', 'toy', 'x']
|
'files': ['an', 'k', 'toy']
|
||||||
|
|
||||||
'warosu':
|
'warosu':
|
||||||
'domain': 'fuuka.warosu.org'
|
'domain': 'fuuka.warosu.org'
|
||||||
|
|||||||
@ -373,6 +373,10 @@ Config =
|
|||||||
true
|
true
|
||||||
'Expand all images only from current position to thread end.'
|
'Expand all images only from current position to thread end.'
|
||||||
]
|
]
|
||||||
|
'Advance on contract': [
|
||||||
|
false
|
||||||
|
'Advance to next post when contracting an expanded image.'
|
||||||
|
]
|
||||||
|
|
||||||
style:
|
style:
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ Get =
|
|||||||
# Stop here if the container has been removed while loading.
|
# Stop here if the container has been removed while loading.
|
||||||
return unless root.parentNode
|
return unless root.parentNode
|
||||||
clone = post.addClone context
|
clone = post.addClone context
|
||||||
Main.callbackNodes Post, [clone]
|
Main.callbackNodes Clone, [clone]
|
||||||
|
|
||||||
# Get rid of the side arrows.
|
# Get rid of the side arrows.
|
||||||
{nodes} = clone
|
{nodes} = clone
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Main =
|
|||||||
|
|
||||||
pathname = location.pathname.split '/'
|
pathname = location.pathname.split '/'
|
||||||
g.BOARD = new Board pathname[1]
|
g.BOARD = new Board pathname[1]
|
||||||
return if g.BOARD.ID is 'z'
|
return if g.BOARD.ID in ['z', 'fk']
|
||||||
g.VIEW =
|
g.VIEW =
|
||||||
switch pathname[2]
|
switch pathname[2]
|
||||||
when 'res'
|
when 'res'
|
||||||
|
|||||||
@ -3,9 +3,6 @@
|
|||||||
background-color: #282A2E;
|
background-color: #282A2E;
|
||||||
border-color: #111;
|
border-color: #111;
|
||||||
}
|
}
|
||||||
:root.tomorrow .field:focus {
|
|
||||||
border-color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
:root.tomorrow #header-bar, :root.tomorrow #notifications {
|
:root.tomorrow #header-bar, :root.tomorrow #notifications {
|
||||||
@ -38,6 +35,15 @@
|
|||||||
:root.tomorrow .qr-preview {
|
:root.tomorrow .qr-preview {
|
||||||
background-color: rgba(255, 255, 255, .15);
|
background-color: rgba(255, 255, 255, .15);
|
||||||
}
|
}
|
||||||
|
:root.tomorrow #qr .field {
|
||||||
|
background-color: rgb(26, 27, 29);
|
||||||
|
color: rgb(197,200,198);
|
||||||
|
border-color: rgb(40, 41, 42);
|
||||||
|
}
|
||||||
|
:root.tomorrow #qr .field:focus {
|
||||||
|
border-color: rgb(129, 162, 190) !important;
|
||||||
|
background-color: rgb(30,32,36);
|
||||||
|
}
|
||||||
|
|
||||||
/* Menu */
|
/* Menu */
|
||||||
:root.tomorrow #menu {
|
:root.tomorrow #menu {
|
||||||
|
|||||||
@ -81,7 +81,14 @@ $.ajax = (url, callbacks, opts={}) ->
|
|||||||
r.setRequestHeader key, val
|
r.setRequestHeader key, val
|
||||||
$.extend r, callbacks
|
$.extend r, callbacks
|
||||||
$.extend r.upload, upCallbacks
|
$.extend r.upload, upCallbacks
|
||||||
r.withCredentials = cred
|
try
|
||||||
|
# Firefox throws an error if you try
|
||||||
|
# to set this on a synchronous XHR.
|
||||||
|
# Only cookies from the remote domain
|
||||||
|
# are used in a request withCredentials.
|
||||||
|
r.withCredentials = cred
|
||||||
|
catch err
|
||||||
|
# do nothing
|
||||||
r.send form
|
r.send form
|
||||||
r
|
r
|
||||||
|
|
||||||
@ -90,17 +97,21 @@ $.cache = do ->
|
|||||||
(url, cb) ->
|
(url, cb) ->
|
||||||
if req = reqs[url]
|
if req = reqs[url]
|
||||||
if req.readyState is 4
|
if req.readyState is 4
|
||||||
cb.call req
|
cb.call req, req.evt
|
||||||
else
|
else
|
||||||
req.callbacks.push cb
|
req.callbacks.push cb
|
||||||
return
|
return
|
||||||
rm = -> delete reqs[url]
|
rm = -> delete reqs[url]
|
||||||
req = $.ajax url,
|
try
|
||||||
onload: (e) ->
|
req = $.ajax url,
|
||||||
cb.call @, e for cb in @callbacks
|
onload: (e) ->
|
||||||
delete @callbacks
|
cb.call @, e for cb in @callbacks
|
||||||
onabort: rm
|
@evt = e
|
||||||
onerror: rm
|
delete @callbacks
|
||||||
|
onabort: rm
|
||||||
|
onerror: rm
|
||||||
|
catch err
|
||||||
|
return
|
||||||
req.callbacks = [cb]
|
req.callbacks = [cb]
|
||||||
reqs[url] = req
|
reqs[url] = req
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class DataBoard
|
|||||||
for boardID, val of @data.boards
|
for boardID, val of @data.boards
|
||||||
# XXX tmp fix for users that had the `null`
|
# XXX tmp fix for users that had the `null`
|
||||||
# value for a board with the Unread features:
|
# value for a board with the Unread features:
|
||||||
unless val
|
if typeof @data.boards[boardID] isnt 'object'
|
||||||
delete @data.boards[boardID]
|
delete @data.boards[boardID]
|
||||||
else
|
else
|
||||||
@deleteIfEmpty {boardID}
|
@deleteIfEmpty {boardID}
|
||||||
|
|||||||
@ -72,7 +72,10 @@ ImageExpand =
|
|||||||
ImageExpand.expand post
|
ImageExpand.expand post
|
||||||
return
|
return
|
||||||
ImageExpand.contract post
|
ImageExpand.contract post
|
||||||
rect = post.nodes.root.getBoundingClientRect()
|
rect = if Conf['Advance on contract'] and !($.hasClass doc, 'fappeTyme')
|
||||||
|
post.nodes.root.nextSibling.getBoundingClientRect()
|
||||||
|
else
|
||||||
|
post.nodes.root.getBoundingClientRect()
|
||||||
return unless rect.top <= 0 or rect.left <= 0
|
return unless rect.top <= 0 or rect.left <= 0
|
||||||
|
|
||||||
{top} = rect
|
{top} = rect
|
||||||
|
|||||||
@ -31,7 +31,7 @@ DeleteLink =
|
|||||||
el: div
|
el: div
|
||||||
order: 40
|
order: 40
|
||||||
open: (post) ->
|
open: (post) ->
|
||||||
return false if post.isDead
|
return false if post.isDead or post.board.ID is 'q'
|
||||||
DeleteLink.post = post
|
DeleteLink.post = post
|
||||||
node = div.firstChild
|
node = div.firstChild
|
||||||
node.textContent = 'Delete'
|
node.textContent = 'Delete'
|
||||||
@ -86,10 +86,7 @@ DeleteLink =
|
|||||||
delete DeleteLink.cooldown.counting
|
delete DeleteLink.cooldown.counting
|
||||||
return
|
return
|
||||||
DeleteLink.cooldown.counting = post
|
DeleteLink.cooldown.counting = post
|
||||||
length = if post.board.ID is 'q'
|
length = 30
|
||||||
600
|
|
||||||
else
|
|
||||||
30
|
|
||||||
seconds = Math.ceil (length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND
|
seconds = Math.ceil (length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND
|
||||||
DeleteLink.cooldown.count post, seconds, length, node
|
DeleteLink.cooldown.count post, seconds, length, node
|
||||||
count: (post, seconds, length, node) ->
|
count: (post, seconds, length, node) ->
|
||||||
|
|||||||
@ -31,19 +31,19 @@ ExpandThread =
|
|||||||
thread.isExpanded = true
|
thread.isExpanded = true
|
||||||
return
|
return
|
||||||
thread.isExpanded = 'loading'
|
thread.isExpanded = 'loading'
|
||||||
a.textContent = a.textContent.replace '+', '× Loading...'
|
a.textContent = a.textContent.replace '+', '...'
|
||||||
$.cache "//api.4chan.org/#{thread.board}/res/#{thread}.json", ->
|
$.cache "//api.4chan.org/#{thread.board}/res/#{thread}.json", ->
|
||||||
ExpandThread.parse @, thread, a
|
ExpandThread.parse @, thread, a
|
||||||
|
|
||||||
when 'loading'
|
when 'loading'
|
||||||
thread.isExpanded = false
|
thread.isExpanded = false
|
||||||
return unless a
|
return unless a
|
||||||
a.textContent = a.textContent.replace '× Loading...', '+'
|
a.textContent = a.textContent.replace '...', '+'
|
||||||
|
|
||||||
when true
|
when true
|
||||||
thread.isExpanded = false
|
thread.isExpanded = false
|
||||||
if a
|
if a
|
||||||
a.textContent = a.textContent.replace '-', '+'
|
a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted')
|
||||||
#goddamit moot
|
#goddamit moot
|
||||||
num = if thread.isSticky
|
num = if thread.isSticky
|
||||||
1
|
1
|
||||||
@ -71,7 +71,7 @@ ExpandThread =
|
|||||||
return
|
return
|
||||||
|
|
||||||
thread.isExpanded = true
|
thread.isExpanded = true
|
||||||
a.textContent = a.textContent.replace '× Loading...', '-'
|
a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded')
|
||||||
|
|
||||||
posts = JSON.parse(req.response).posts
|
posts = JSON.parse(req.response).posts
|
||||||
if spoilerRange = posts[0].custom_spoiler
|
if spoilerRange = posts[0].custom_spoiler
|
||||||
|
|||||||
@ -131,7 +131,7 @@ Unread =
|
|||||||
Unread.db.set
|
Unread.db.set
|
||||||
boardID: Unread.thread.board.ID
|
boardID: Unread.thread.board.ID
|
||||||
threadID: Unread.thread.ID
|
threadID: Unread.thread.ID
|
||||||
val: Unread.lastReadPost
|
val: Unread.lastReadPost
|
||||||
|
|
||||||
setLine: (force) ->
|
setLine: (force) ->
|
||||||
return unless d.hidden or force is true
|
return unless d.hidden or force is true
|
||||||
|
|||||||
@ -249,7 +249,7 @@ QR =
|
|||||||
else 300
|
else 300
|
||||||
sage: if board is 'q' then 600 else 60
|
sage: if board is 'q' then 600 else 60
|
||||||
file: if board is 'q' then 300 else 30
|
file: if board is 'q' then 300 else 30
|
||||||
post: if board is 'q' then 60 else 30
|
post: if board is 'q' then 150 else 30
|
||||||
QR.cooldown.upSpd = 0
|
QR.cooldown.upSpd = 0
|
||||||
QR.cooldown.upSpdAccuracy = .5
|
QR.cooldown.upSpdAccuracy = .5
|
||||||
$.get "cooldown.#{board}", {}, (item) ->
|
$.get "cooldown.#{board}", {}, (item) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user