Release 4chan X v1.10.1.4.

This commit is contained in:
ccd0 2015-02-15 22:24:38 -08:00
parent 414be72b4a
commit 96224f8480
14 changed files with 159 additions and 66 deletions

View File

@ -4,6 +4,9 @@ The links to individual versions below are to copies of the script with the upda
### v1.10.1
**v1.10.1.4** *(2015-02-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.4/builds/4chan-X-noupdate.crx "Chromium version")]
- Better, more reliable cleaning of old data.
**v1.10.1.3** *(2015-02-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.3/builds/4chan-X-noupdate.crx "Chromium version")]
- Fix HTTP links (from embedding) in inlined quotes.

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.10.1.3
* 4chan X - Version 1.10.1.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
// @version 1.10.1.3
// @version 1.10.1.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
// @version 1.10.1.3
// @version 1.10.1.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.10.1.3
* 4chan X - Version 1.10.1.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -405,7 +405,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.1.3',
VERSION: '1.10.1.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -1706,7 +1706,7 @@
};
DataBoard.prototype.clean = function() {
var boardID, now, threadID, val, _ref;
var boardID, now, val, _ref;
$.forceSync(this.key);
_ref = this.data.boards;
for (boardID in _ref) {
@ -1719,28 +1719,57 @@
if ((this.data.lastChecked || 0) < now - 2 * $.HOUR) {
this.data.lastChecked = now;
for (boardID in this.data.boards) {
for (threadID in this.data.boards[boardID]) {
this.ajaxClean(boardID, threadID);
}
this.ajaxClean(boardID);
}
}
};
DataBoard.prototype.ajaxClean = function(boardID, threadID) {
return $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
onloadend: (function(_this) {
return function(e) {
if (e.target.status === 404) {
return _this["delete"]({
boardID: boardID,
threadID: threadID
DataBoard.prototype.ajaxClean = function(boardID) {
return $.cache("//a.4cdn.org/" + boardID + "/threads.json", (function(_this) {
return function(e1) {
if (e1.target.status === 200) {
if (boardID === 'b' || boardID === 'f') {
return _this.ajaxCleanParse(boardID, e1.target.response);
} else {
return $.cache("//a.4cdn.org/" + boardID + "/archive.json", function(e2) {
if (e2.target.status === 200) {
return _this.ajaxCleanParse(boardID, e1.target.response, e2.target.response);
}
});
}
};
})(this)
}, {
type: 'head'
}
};
})(this));
};
DataBoard.prototype.ajaxCleanParse = function(boardID, response1, response2) {
var ID, board, page, thread, threads, _i, _j, _k, _len, _len1, _len2, _ref;
board = this.data.boards[boardID];
threads = {};
for (_i = 0, _len = response1.length; _i < _len; _i++) {
page = response1[_i];
_ref = page.threads;
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
thread = _ref[_j];
ID = thread.no;
if (ID in board) {
threads[ID] = board[ID];
}
}
}
if (response2) {
for (_k = 0, _len2 = response2.length; _k < _len2; _k++) {
ID = response2[_k];
if (ID in board) {
threads[ID] = board[ID];
}
}
}
this.data.boards[boardID] = threads;
this.deleteIfEmpty({
boardID: boardID
});
return this.save();
};
DataBoard.prototype.onSync = function(data) {
@ -7957,7 +7986,7 @@
this.occupied = true;
this.timeout = Date.now() + this.lifetime;
if (!img) {
img = this.nodes.img = new Image;
img = this.nodes.img = new Image();
$.one(img, 'load', this.afterSetup.bind(this));
$.on(img, 'load', function() {
return this.hidden = false;
@ -12489,6 +12518,7 @@
if ($.hasClass(this, 'disabled')) {
return;
}
ThreadWatcher.db.forceSync();
_ref = ThreadWatcher.getAll();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
_ref1 = _ref[_i], boardID = _ref1.boardID, threadID = _ref1.threadID, data = _ref1.data;

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.10.1.3
// @version 1.10.1.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -24,7 +24,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.10.1.3
* 4chan X - Version 1.10.1.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -404,7 +404,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.1.3',
VERSION: '1.10.1.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -1705,7 +1705,7 @@
};
DataBoard.prototype.clean = function() {
var boardID, now, threadID, val, _ref;
var boardID, now, val, _ref;
$.forceSync(this.key);
_ref = this.data.boards;
for (boardID in _ref) {
@ -1718,28 +1718,57 @@
if ((this.data.lastChecked || 0) < now - 2 * $.HOUR) {
this.data.lastChecked = now;
for (boardID in this.data.boards) {
for (threadID in this.data.boards[boardID]) {
this.ajaxClean(boardID, threadID);
}
this.ajaxClean(boardID);
}
}
};
DataBoard.prototype.ajaxClean = function(boardID, threadID) {
return $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
onloadend: (function(_this) {
return function(e) {
if (e.target.status === 404) {
return _this["delete"]({
boardID: boardID,
threadID: threadID
DataBoard.prototype.ajaxClean = function(boardID) {
return $.cache("//a.4cdn.org/" + boardID + "/threads.json", (function(_this) {
return function(e1) {
if (e1.target.status === 200) {
if (boardID === 'b' || boardID === 'f') {
return _this.ajaxCleanParse(boardID, e1.target.response);
} else {
return $.cache("//a.4cdn.org/" + boardID + "/archive.json", function(e2) {
if (e2.target.status === 200) {
return _this.ajaxCleanParse(boardID, e1.target.response, e2.target.response);
}
});
}
};
})(this)
}, {
type: 'head'
}
};
})(this));
};
DataBoard.prototype.ajaxCleanParse = function(boardID, response1, response2) {
var ID, board, page, thread, threads, _i, _j, _k, _len, _len1, _len2, _ref;
board = this.data.boards[boardID];
threads = {};
for (_i = 0, _len = response1.length; _i < _len; _i++) {
page = response1[_i];
_ref = page.threads;
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
thread = _ref[_j];
ID = thread.no;
if (ID in board) {
threads[ID] = board[ID];
}
}
}
if (response2) {
for (_k = 0, _len2 = response2.length; _k < _len2; _k++) {
ID = response2[_k];
if (ID in board) {
threads[ID] = board[ID];
}
}
}
this.data.boards[boardID] = threads;
this.deleteIfEmpty({
boardID: boardID
});
return this.save();
};
DataBoard.prototype.onSync = function(data) {
@ -7956,7 +7985,7 @@
this.occupied = true;
this.timeout = Date.now() + this.lifetime;
if (!img) {
img = this.nodes.img = new Image;
img = this.nodes.img = new Image();
$.one(img, 'load', this.afterSetup.bind(this));
$.on(img, 'load', function() {
return this.hidden = false;
@ -12488,6 +12517,7 @@
if ($.hasClass(this, 'disabled')) {
return;
}
ThreadWatcher.db.forceSync();
_ref = ThreadWatcher.getAll();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
_ref1 = _ref[_i], boardID = _ref1.boardID, threadID = _ref1.threadID, data = _ref1.data;

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
// @version 1.10.1.3
// @version 1.10.1.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.10.1.3
// @version 1.10.1.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.10.1.3
* 4chan X - Version 1.10.1.4
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -405,7 +405,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.1.3',
VERSION: '1.10.1.4',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -1706,7 +1706,7 @@
};
DataBoard.prototype.clean = function() {
var boardID, now, threadID, val, _ref;
var boardID, now, val, _ref;
$.forceSync(this.key);
_ref = this.data.boards;
for (boardID in _ref) {
@ -1719,28 +1719,57 @@
if ((this.data.lastChecked || 0) < now - 2 * $.HOUR) {
this.data.lastChecked = now;
for (boardID in this.data.boards) {
for (threadID in this.data.boards[boardID]) {
this.ajaxClean(boardID, threadID);
}
this.ajaxClean(boardID);
}
}
};
DataBoard.prototype.ajaxClean = function(boardID, threadID) {
return $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
onloadend: (function(_this) {
return function(e) {
if (e.target.status === 404) {
return _this["delete"]({
boardID: boardID,
threadID: threadID
DataBoard.prototype.ajaxClean = function(boardID) {
return $.cache("//a.4cdn.org/" + boardID + "/threads.json", (function(_this) {
return function(e1) {
if (e1.target.status === 200) {
if (boardID === 'b' || boardID === 'f') {
return _this.ajaxCleanParse(boardID, e1.target.response);
} else {
return $.cache("//a.4cdn.org/" + boardID + "/archive.json", function(e2) {
if (e2.target.status === 200) {
return _this.ajaxCleanParse(boardID, e1.target.response, e2.target.response);
}
});
}
};
})(this)
}, {
type: 'head'
}
};
})(this));
};
DataBoard.prototype.ajaxCleanParse = function(boardID, response1, response2) {
var ID, board, page, thread, threads, _i, _j, _k, _len, _len1, _len2, _ref;
board = this.data.boards[boardID];
threads = {};
for (_i = 0, _len = response1.length; _i < _len; _i++) {
page = response1[_i];
_ref = page.threads;
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
thread = _ref[_j];
ID = thread.no;
if (ID in board) {
threads[ID] = board[ID];
}
}
}
if (response2) {
for (_k = 0, _len2 = response2.length; _k < _len2; _k++) {
ID = response2[_k];
if (ID in board) {
threads[ID] = board[ID];
}
}
}
this.data.boards[boardID] = threads;
this.deleteIfEmpty({
boardID: boardID
});
return this.save();
};
DataBoard.prototype.onSync = function(data) {
@ -7957,7 +7986,7 @@
this.occupied = true;
this.timeout = Date.now() + this.lifetime;
if (!img) {
img = this.nodes.img = new Image;
img = this.nodes.img = new Image();
$.one(img, 'load', this.afterSetup.bind(this));
$.on(img, 'load', function() {
return this.hidden = false;
@ -12489,6 +12518,7 @@
if ($.hasClass(this, 'disabled')) {
return;
}
ThreadWatcher.db.forceSync();
_ref = ThreadWatcher.getAll();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
_ref1 = _ref[_i], boardID = _ref1.boardID, threadID = _ref1.threadID, data = _ref1.data;

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.1.3' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.1.4' />
</app>
</gupdate>

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.1.3' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.1.4' />
</app>
</gupdate>

View File

@ -3,7 +3,7 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
"version": "1.10.1.3",
"version": "1.10.1.4",
"repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/",