Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3
Conflicts: LICENSE json/archives.json
This commit is contained in:
commit
de16671c49
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.3.0 - 2014-01-10
|
||||
* 4chan X - Version 1.3.0 - 2014-01-11
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.3.0 - 2014-01-10
|
||||
* 4chan X - Version 1.3.0 - 2014-01-11
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2435,7 +2435,7 @@
|
||||
return $.addClass(Index.button, 'fa-spin');
|
||||
},
|
||||
load: function(e, pageNum) {
|
||||
var err, notice, req, timeEl;
|
||||
var err, notice, req, timeEl, _ref;
|
||||
$.rmClass(Index.button, 'fa-spin');
|
||||
req = Index.req, notice = Index.notice;
|
||||
delete Index.req;
|
||||
@ -2445,6 +2445,17 @@
|
||||
notice.close();
|
||||
return;
|
||||
}
|
||||
if ((_ref = req.status) !== 200 && _ref !== 304) {
|
||||
err = "Index refresh failed. Error " + req.statusText + " (" + req.status + ")";
|
||||
if (notice) {
|
||||
notice.setType('warning');
|
||||
notice.el.lastElementChild.textContent = err;
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
} else {
|
||||
new Notice('warning', err, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (req.status === 200) {
|
||||
Index.parse(JSON.parse(req.response), pageNum);
|
||||
@ -2457,9 +2468,9 @@
|
||||
if (notice) {
|
||||
notice.setType('error');
|
||||
notice.el.lastElementChild.textContent = 'Index refresh failed.';
|
||||
setTimeout(notice.close, 2 * $.SECOND);
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
} else {
|
||||
new Notice('error', 'Index refresh failed.', 2);
|
||||
new Notice('error', 'Index refresh failed.', 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -9850,8 +9861,8 @@
|
||||
}
|
||||
},
|
||||
"4plebs": {
|
||||
boards: ["hr", "pol", "s4s", "tg", "tv", "x"],
|
||||
files: ["hr", "pol", "s4s", "tg", "tv", "x"],
|
||||
boards: ["hr", "o", "pol", "s4s", "tg", "tv", "x"],
|
||||
files: ["hr", "o", "pol", "s4s", "tg", "tv", "x"],
|
||||
data: {
|
||||
domain: "archive.4plebs.org",
|
||||
http: true,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* 4chan X - Version 1.3.0 - 2014-01-10
|
||||
* 4chan X - Version 1.3.0 - 2014-01-11
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2445,7 +2445,7 @@
|
||||
return $.addClass(Index.button, 'fa-spin');
|
||||
},
|
||||
load: function(e, pageNum) {
|
||||
var err, notice, req, timeEl;
|
||||
var err, notice, req, timeEl, _ref;
|
||||
$.rmClass(Index.button, 'fa-spin');
|
||||
req = Index.req, notice = Index.notice;
|
||||
delete Index.req;
|
||||
@ -2455,6 +2455,17 @@
|
||||
notice.close();
|
||||
return;
|
||||
}
|
||||
if ((_ref = req.status) !== 200 && _ref !== 304) {
|
||||
err = "Index refresh failed. Error " + req.statusText + " (" + req.status + ")";
|
||||
if (notice) {
|
||||
notice.setType('warning');
|
||||
notice.el.lastElementChild.textContent = err;
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
} else {
|
||||
new Notice('warning', err, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (req.status === 200) {
|
||||
Index.parse(JSON.parse(req.response), pageNum);
|
||||
@ -2467,9 +2478,9 @@
|
||||
if (notice) {
|
||||
notice.setType('error');
|
||||
notice.el.lastElementChild.textContent = 'Index refresh failed.';
|
||||
setTimeout(notice.close, 2 * $.SECOND);
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
} else {
|
||||
new Notice('error', 'Index refresh failed.', 2);
|
||||
new Notice('error', 'Index refresh failed.', 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -9839,8 +9850,8 @@
|
||||
}
|
||||
},
|
||||
"4plebs": {
|
||||
boards: ["hr", "pol", "s4s", "tg", "tv", "x"],
|
||||
files: ["hr", "pol", "s4s", "tg", "tv", "x"],
|
||||
boards: ["hr", "o", "pol", "s4s", "tg", "tv", "x"],
|
||||
files: ["hr", "o", "pol", "s4s", "tg", "tv", "x"],
|
||||
data: {
|
||||
domain: "archive.4plebs.org",
|
||||
http: true,
|
||||
|
||||
@ -52,8 +52,8 @@ Redirect =
|
||||
software: "foolfuuka"
|
||||
|
||||
"4plebs":
|
||||
boards: ["hr", "pol", "s4s", "tg", "tv", "x"]
|
||||
files: ["hr", "pol", "s4s", "tg", "tv", "x"]
|
||||
boards: ["hr", "o", "pol", "s4s", "tg", "tv", "x"]
|
||||
files: ["hr", "o", "pol", "s4s", "tg", "tv", "x"]
|
||||
data:
|
||||
domain: "archive.4plebs.org"
|
||||
http: true
|
||||
|
||||
@ -222,6 +222,16 @@ Index =
|
||||
notice.close()
|
||||
return
|
||||
|
||||
if req.status not in [200, 304]
|
||||
err = "Index refresh failed. Error #{req.statusText} (#{req.status})"
|
||||
if notice
|
||||
notice.setType 'warning'
|
||||
notice.el.lastElementChild.textContent = err
|
||||
setTimeout notice.close, $.SECOND
|
||||
else
|
||||
new Notice 'warning', err, 1
|
||||
return
|
||||
|
||||
try
|
||||
if req.status is 200
|
||||
Index.parse JSON.parse(req.response), pageNum
|
||||
@ -233,9 +243,9 @@ Index =
|
||||
if notice
|
||||
notice.setType 'error'
|
||||
notice.el.lastElementChild.textContent = 'Index refresh failed.'
|
||||
setTimeout notice.close, 2 * $.SECOND
|
||||
setTimeout notice.close, $.SECOND
|
||||
else
|
||||
new Notice 'error', 'Index refresh failed.', 2
|
||||
new Notice 'error', 'Index refresh failed.', 1
|
||||
return
|
||||
|
||||
timeEl = $ '#index-last-refresh', Index.navLinks
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user