Release 4chan X v1.13.10.4.
This commit is contained in:
parent
d8dd672710
commit
58805277d8
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
### v1.13.10
|
### v1.13.10
|
||||||
|
|
||||||
|
**v1.13.10.4** *(2017-07-29)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.4/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.4/builds/4chan-X-noupdate.crx)]
|
||||||
|
- Reduce disk reads preformed by QR Cooldown.
|
||||||
|
- Change the MD5 Quick Filter button from a trash can to an X.
|
||||||
|
|
||||||
**v1.13.10.3** *(2017-07-26)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.3/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.3/builds/4chan-X-noupdate.crx)]
|
**v1.13.10.3** *(2017-07-26)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.3/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.10.3/builds/4chan-X-noupdate.crx)]
|
||||||
- Fix double sticky icon bug on /f/.
|
- Fix double sticky icon bug on /f/.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.10.3
|
// @version 1.13.10.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.10.3
|
// @version 1.13.10.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -153,7 +153,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.10.3',
|
VERSION: '1.13.10.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -16398,7 +16398,7 @@ FileInfo = (function() {
|
|||||||
},
|
},
|
||||||
f: function() {
|
f: function() {
|
||||||
return {
|
return {
|
||||||
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-trash-o quick-filter-md5\"></a>"
|
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-times quick-filter-md5\"></a>"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
p: function() {
|
p: function() {
|
||||||
@ -22277,6 +22277,7 @@ QR = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.data = Conf['cooldowns'];
|
this.data = Conf['cooldowns'];
|
||||||
|
this.changes = {};
|
||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
@ -22324,6 +22325,7 @@ QR = (function() {
|
|||||||
postID: postID
|
postID: postID
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addDelay: function(post, delay) {
|
addDelay: function(post, delay) {
|
||||||
@ -22334,6 +22336,7 @@ QR = (function() {
|
|||||||
cooldown = QR.cooldown.categorize(post);
|
cooldown = QR.cooldown.categorize(post);
|
||||||
cooldown.delay = delay;
|
cooldown.delay = delay;
|
||||||
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addMute: function(delay) {
|
addMute: function(delay) {
|
||||||
@ -22344,6 +22347,7 @@ QR = (function() {
|
|||||||
type: 'mute',
|
type: 'mute',
|
||||||
delay: delay
|
delay: delay
|
||||||
});
|
});
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
"delete": function(post) {
|
"delete": function(post) {
|
||||||
@ -22351,15 +22355,14 @@ QR = (function() {
|
|||||||
if (!QR.cooldown.data) {
|
if (!QR.cooldown.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
|
||||||
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
||||||
for (id in cooldowns) {
|
for (id in cooldowns) {
|
||||||
cooldown = cooldowns[id];
|
cooldown = cooldowns[id];
|
||||||
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
||||||
delete cooldowns[id];
|
QR.cooldown.set(post.board.ID, id, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.cooldown.save([post.board.ID]);
|
return QR.cooldown.save();
|
||||||
},
|
},
|
||||||
secondsDeletion: function(post) {
|
secondsDeletion: function(post) {
|
||||||
var cooldown, cooldowns, seconds, start;
|
var cooldown, cooldowns, seconds, start;
|
||||||
@ -22388,31 +22391,49 @@ QR = (function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set: function(scope, id, value) {
|
mergeChange: function(data, scope, id, value) {
|
||||||
var base, cooldowns;
|
if (value) {
|
||||||
$.forceSync('cooldowns');
|
return (data[scope] || (data[scope] = {}))[id] = value;
|
||||||
cooldowns = ((base = QR.cooldown.data)[scope] || (base[scope] = {}));
|
} else if (scope in data) {
|
||||||
cooldowns[id] = value;
|
delete data[scope][id];
|
||||||
return $.set('cooldowns', QR.cooldown.data);
|
if (Object.keys(data[scope]).length === 0) {
|
||||||
},
|
return delete data[scope];
|
||||||
save: function(scopes) {
|
|
||||||
var data, i, len, scope;
|
|
||||||
data = QR.cooldown.data;
|
|
||||||
for (i = 0, len = scopes.length; i < len; i++) {
|
|
||||||
scope = scopes[i];
|
|
||||||
if (scope in data && !Object.keys(data[scope]).length) {
|
|
||||||
delete data[scope];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.set('cooldowns', data);
|
},
|
||||||
|
set: function(scope, id, value) {
|
||||||
|
var base;
|
||||||
|
QR.cooldown.mergeChange(QR.cooldown.data, scope, id, value);
|
||||||
|
return ((base = QR.cooldown.changes)[scope] || (base[scope] = {}))[id] = value;
|
||||||
|
},
|
||||||
|
save: function() {
|
||||||
|
var changes;
|
||||||
|
changes = QR.cooldown.changes;
|
||||||
|
if (!Object.keys(changes).length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return $.get('cooldowns', {}, function(arg) {
|
||||||
|
var cooldowns, id, ref, scope, value;
|
||||||
|
cooldowns = arg.cooldowns;
|
||||||
|
for (scope in QR.cooldown.changes) {
|
||||||
|
ref = QR.cooldown.changes[scope];
|
||||||
|
for (id in ref) {
|
||||||
|
value = ref[id];
|
||||||
|
QR.cooldown.mergeChange(cooldowns, scope, id, value);
|
||||||
|
}
|
||||||
|
QR.cooldown.data = cooldowns;
|
||||||
|
}
|
||||||
|
return $.set('cooldowns', cooldowns, function() {
|
||||||
|
return QR.cooldown.changes = {};
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
update: function() {
|
update: function() {
|
||||||
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
||||||
if (!QR.cooldown.isCounting) {
|
if (!QR.cooldown.isCounting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
save = false;
|
||||||
save = [];
|
|
||||||
nCooldowns = 0;
|
nCooldowns = 0;
|
||||||
now = Date.now();
|
now = Date.now();
|
||||||
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
||||||
@ -22427,14 +22448,14 @@ QR = (function() {
|
|||||||
start = +start;
|
start = +start;
|
||||||
elapsed = Math.floor((now - start) / $.SECOND);
|
elapsed = Math.floor((now - start) / $.SECOND);
|
||||||
if (elapsed < 0) {
|
if (elapsed < 0) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cooldown.delay != null) {
|
if (cooldown.delay != null) {
|
||||||
if (cooldown.delay <= elapsed) {
|
if (cooldown.delay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
||||||
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
||||||
}
|
}
|
||||||
@ -22445,8 +22466,8 @@ QR = (function() {
|
|||||||
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
||||||
}
|
}
|
||||||
if (maxDelay <= elapsed) {
|
if (maxDelay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
@ -22460,8 +22481,8 @@ QR = (function() {
|
|||||||
nCooldowns += Object.keys(cooldowns).length;
|
nCooldowns += Object.keys(cooldowns).length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (save.length) {
|
if (save) {
|
||||||
QR.cooldown.save(save);
|
QR.cooldown.save;
|
||||||
}
|
}
|
||||||
if (nCooldowns) {
|
if (nCooldowns) {
|
||||||
clearTimeout(QR.cooldown.timeout);
|
clearTimeout(QR.cooldown.timeout);
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.10.3
|
// @version 1.13.10.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -153,7 +153,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.10.3',
|
VERSION: '1.13.10.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -16398,7 +16398,7 @@ FileInfo = (function() {
|
|||||||
},
|
},
|
||||||
f: function() {
|
f: function() {
|
||||||
return {
|
return {
|
||||||
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-trash-o quick-filter-md5\"></a>"
|
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-times quick-filter-md5\"></a>"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
p: function() {
|
p: function() {
|
||||||
@ -22277,6 +22277,7 @@ QR = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.data = Conf['cooldowns'];
|
this.data = Conf['cooldowns'];
|
||||||
|
this.changes = {};
|
||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
@ -22324,6 +22325,7 @@ QR = (function() {
|
|||||||
postID: postID
|
postID: postID
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addDelay: function(post, delay) {
|
addDelay: function(post, delay) {
|
||||||
@ -22334,6 +22336,7 @@ QR = (function() {
|
|||||||
cooldown = QR.cooldown.categorize(post);
|
cooldown = QR.cooldown.categorize(post);
|
||||||
cooldown.delay = delay;
|
cooldown.delay = delay;
|
||||||
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addMute: function(delay) {
|
addMute: function(delay) {
|
||||||
@ -22344,6 +22347,7 @@ QR = (function() {
|
|||||||
type: 'mute',
|
type: 'mute',
|
||||||
delay: delay
|
delay: delay
|
||||||
});
|
});
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
"delete": function(post) {
|
"delete": function(post) {
|
||||||
@ -22351,15 +22355,14 @@ QR = (function() {
|
|||||||
if (!QR.cooldown.data) {
|
if (!QR.cooldown.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
|
||||||
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
||||||
for (id in cooldowns) {
|
for (id in cooldowns) {
|
||||||
cooldown = cooldowns[id];
|
cooldown = cooldowns[id];
|
||||||
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
||||||
delete cooldowns[id];
|
QR.cooldown.set(post.board.ID, id, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.cooldown.save([post.board.ID]);
|
return QR.cooldown.save();
|
||||||
},
|
},
|
||||||
secondsDeletion: function(post) {
|
secondsDeletion: function(post) {
|
||||||
var cooldown, cooldowns, seconds, start;
|
var cooldown, cooldowns, seconds, start;
|
||||||
@ -22388,31 +22391,49 @@ QR = (function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set: function(scope, id, value) {
|
mergeChange: function(data, scope, id, value) {
|
||||||
var base, cooldowns;
|
if (value) {
|
||||||
$.forceSync('cooldowns');
|
return (data[scope] || (data[scope] = {}))[id] = value;
|
||||||
cooldowns = ((base = QR.cooldown.data)[scope] || (base[scope] = {}));
|
} else if (scope in data) {
|
||||||
cooldowns[id] = value;
|
delete data[scope][id];
|
||||||
return $.set('cooldowns', QR.cooldown.data);
|
if (Object.keys(data[scope]).length === 0) {
|
||||||
},
|
return delete data[scope];
|
||||||
save: function(scopes) {
|
|
||||||
var data, i, len, scope;
|
|
||||||
data = QR.cooldown.data;
|
|
||||||
for (i = 0, len = scopes.length; i < len; i++) {
|
|
||||||
scope = scopes[i];
|
|
||||||
if (scope in data && !Object.keys(data[scope]).length) {
|
|
||||||
delete data[scope];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.set('cooldowns', data);
|
},
|
||||||
|
set: function(scope, id, value) {
|
||||||
|
var base;
|
||||||
|
QR.cooldown.mergeChange(QR.cooldown.data, scope, id, value);
|
||||||
|
return ((base = QR.cooldown.changes)[scope] || (base[scope] = {}))[id] = value;
|
||||||
|
},
|
||||||
|
save: function() {
|
||||||
|
var changes;
|
||||||
|
changes = QR.cooldown.changes;
|
||||||
|
if (!Object.keys(changes).length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return $.get('cooldowns', {}, function(arg) {
|
||||||
|
var cooldowns, id, ref, scope, value;
|
||||||
|
cooldowns = arg.cooldowns;
|
||||||
|
for (scope in QR.cooldown.changes) {
|
||||||
|
ref = QR.cooldown.changes[scope];
|
||||||
|
for (id in ref) {
|
||||||
|
value = ref[id];
|
||||||
|
QR.cooldown.mergeChange(cooldowns, scope, id, value);
|
||||||
|
}
|
||||||
|
QR.cooldown.data = cooldowns;
|
||||||
|
}
|
||||||
|
return $.set('cooldowns', cooldowns, function() {
|
||||||
|
return QR.cooldown.changes = {};
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
update: function() {
|
update: function() {
|
||||||
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
||||||
if (!QR.cooldown.isCounting) {
|
if (!QR.cooldown.isCounting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
save = false;
|
||||||
save = [];
|
|
||||||
nCooldowns = 0;
|
nCooldowns = 0;
|
||||||
now = Date.now();
|
now = Date.now();
|
||||||
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
||||||
@ -22427,14 +22448,14 @@ QR = (function() {
|
|||||||
start = +start;
|
start = +start;
|
||||||
elapsed = Math.floor((now - start) / $.SECOND);
|
elapsed = Math.floor((now - start) / $.SECOND);
|
||||||
if (elapsed < 0) {
|
if (elapsed < 0) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cooldown.delay != null) {
|
if (cooldown.delay != null) {
|
||||||
if (cooldown.delay <= elapsed) {
|
if (cooldown.delay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
||||||
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
||||||
}
|
}
|
||||||
@ -22445,8 +22466,8 @@ QR = (function() {
|
|||||||
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
||||||
}
|
}
|
||||||
if (maxDelay <= elapsed) {
|
if (maxDelay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
@ -22460,8 +22481,8 @@ QR = (function() {
|
|||||||
nCooldowns += Object.keys(cooldowns).length;
|
nCooldowns += Object.keys(cooldowns).length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (save.length) {
|
if (save) {
|
||||||
QR.cooldown.save(save);
|
QR.cooldown.save;
|
||||||
}
|
}
|
||||||
if (nCooldowns) {
|
if (nCooldowns) {
|
||||||
clearTimeout(QR.cooldown.timeout);
|
clearTimeout(QR.cooldown.timeout);
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.10.3
|
// @version 1.13.10.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.10.3
|
// @version 1.13.10.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -153,7 +153,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.10.3',
|
VERSION: '1.13.10.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -16398,7 +16398,7 @@ FileInfo = (function() {
|
|||||||
},
|
},
|
||||||
f: function() {
|
f: function() {
|
||||||
return {
|
return {
|
||||||
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-trash-o quick-filter-md5\"></a>"
|
innerHTML: "<a href=\"javascript:;\" class=\"fa fa-times quick-filter-md5\"></a>"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
p: function() {
|
p: function() {
|
||||||
@ -22277,6 +22277,7 @@ QR = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.data = Conf['cooldowns'];
|
this.data = Conf['cooldowns'];
|
||||||
|
this.changes = {};
|
||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
@ -22324,6 +22325,7 @@ QR = (function() {
|
|||||||
postID: postID
|
postID: postID
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addDelay: function(post, delay) {
|
addDelay: function(post, delay) {
|
||||||
@ -22334,6 +22336,7 @@ QR = (function() {
|
|||||||
cooldown = QR.cooldown.categorize(post);
|
cooldown = QR.cooldown.categorize(post);
|
||||||
cooldown.delay = delay;
|
cooldown.delay = delay;
|
||||||
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
QR.cooldown.set(g.BOARD.ID, Date.now(), cooldown);
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
addMute: function(delay) {
|
addMute: function(delay) {
|
||||||
@ -22344,6 +22347,7 @@ QR = (function() {
|
|||||||
type: 'mute',
|
type: 'mute',
|
||||||
delay: delay
|
delay: delay
|
||||||
});
|
});
|
||||||
|
QR.cooldown.save();
|
||||||
return QR.cooldown.start();
|
return QR.cooldown.start();
|
||||||
},
|
},
|
||||||
"delete": function(post) {
|
"delete": function(post) {
|
||||||
@ -22351,15 +22355,14 @@ QR = (function() {
|
|||||||
if (!QR.cooldown.data) {
|
if (!QR.cooldown.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
|
||||||
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
cooldowns = ((base = QR.cooldown.data)[name = post.board.ID] || (base[name] = {}));
|
||||||
for (id in cooldowns) {
|
for (id in cooldowns) {
|
||||||
cooldown = cooldowns[id];
|
cooldown = cooldowns[id];
|
||||||
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
if ((cooldown.delay == null) && cooldown.threadID === post.thread.ID && cooldown.postID === post.ID) {
|
||||||
delete cooldowns[id];
|
QR.cooldown.set(post.board.ID, id, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QR.cooldown.save([post.board.ID]);
|
return QR.cooldown.save();
|
||||||
},
|
},
|
||||||
secondsDeletion: function(post) {
|
secondsDeletion: function(post) {
|
||||||
var cooldown, cooldowns, seconds, start;
|
var cooldown, cooldowns, seconds, start;
|
||||||
@ -22388,31 +22391,49 @@ QR = (function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set: function(scope, id, value) {
|
mergeChange: function(data, scope, id, value) {
|
||||||
var base, cooldowns;
|
if (value) {
|
||||||
$.forceSync('cooldowns');
|
return (data[scope] || (data[scope] = {}))[id] = value;
|
||||||
cooldowns = ((base = QR.cooldown.data)[scope] || (base[scope] = {}));
|
} else if (scope in data) {
|
||||||
cooldowns[id] = value;
|
delete data[scope][id];
|
||||||
return $.set('cooldowns', QR.cooldown.data);
|
if (Object.keys(data[scope]).length === 0) {
|
||||||
},
|
return delete data[scope];
|
||||||
save: function(scopes) {
|
|
||||||
var data, i, len, scope;
|
|
||||||
data = QR.cooldown.data;
|
|
||||||
for (i = 0, len = scopes.length; i < len; i++) {
|
|
||||||
scope = scopes[i];
|
|
||||||
if (scope in data && !Object.keys(data[scope]).length) {
|
|
||||||
delete data[scope];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.set('cooldowns', data);
|
},
|
||||||
|
set: function(scope, id, value) {
|
||||||
|
var base;
|
||||||
|
QR.cooldown.mergeChange(QR.cooldown.data, scope, id, value);
|
||||||
|
return ((base = QR.cooldown.changes)[scope] || (base[scope] = {}))[id] = value;
|
||||||
|
},
|
||||||
|
save: function() {
|
||||||
|
var changes;
|
||||||
|
changes = QR.cooldown.changes;
|
||||||
|
if (!Object.keys(changes).length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return $.get('cooldowns', {}, function(arg) {
|
||||||
|
var cooldowns, id, ref, scope, value;
|
||||||
|
cooldowns = arg.cooldowns;
|
||||||
|
for (scope in QR.cooldown.changes) {
|
||||||
|
ref = QR.cooldown.changes[scope];
|
||||||
|
for (id in ref) {
|
||||||
|
value = ref[id];
|
||||||
|
QR.cooldown.mergeChange(cooldowns, scope, id, value);
|
||||||
|
}
|
||||||
|
QR.cooldown.data = cooldowns;
|
||||||
|
}
|
||||||
|
return $.set('cooldowns', cooldowns, function() {
|
||||||
|
return QR.cooldown.changes = {};
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
update: function() {
|
update: function() {
|
||||||
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
var base, cooldown, cooldowns, elapsed, i, len, maxDelay, nCooldowns, now, ref, ref1, save, scope, seconds, start, suffix, threadID, type, update;
|
||||||
if (!QR.cooldown.isCounting) {
|
if (!QR.cooldown.isCounting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.forceSync('cooldowns');
|
save = false;
|
||||||
save = [];
|
|
||||||
nCooldowns = 0;
|
nCooldowns = 0;
|
||||||
now = Date.now();
|
now = Date.now();
|
||||||
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
ref = QR.cooldown.categorize(QR.posts[0]), type = ref.type, threadID = ref.threadID;
|
||||||
@ -22427,14 +22448,14 @@ QR = (function() {
|
|||||||
start = +start;
|
start = +start;
|
||||||
elapsed = Math.floor((now - start) / $.SECOND);
|
elapsed = Math.floor((now - start) / $.SECOND);
|
||||||
if (elapsed < 0) {
|
if (elapsed < 0) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cooldown.delay != null) {
|
if (cooldown.delay != null) {
|
||||||
if (cooldown.delay <= elapsed) {
|
if (cooldown.delay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
} else if ((cooldown.type === type && cooldown.threadID === threadID) || cooldown.type === 'mute') {
|
||||||
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
seconds = Math.max(seconds, cooldown.delay - elapsed);
|
||||||
}
|
}
|
||||||
@ -22445,8 +22466,8 @@ QR = (function() {
|
|||||||
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
maxDelay = Math.max(maxDelay, parseInt(Conf['customCooldown'], 10));
|
||||||
}
|
}
|
||||||
if (maxDelay <= elapsed) {
|
if (maxDelay <= elapsed) {
|
||||||
delete cooldowns[start];
|
QR.cooldown.set(scope, start, null);
|
||||||
save.push(scope);
|
save = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
@ -22460,8 +22481,8 @@ QR = (function() {
|
|||||||
nCooldowns += Object.keys(cooldowns).length;
|
nCooldowns += Object.keys(cooldowns).length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (save.length) {
|
if (save) {
|
||||||
QR.cooldown.save(save);
|
QR.cooldown.save;
|
||||||
}
|
}
|
||||||
if (nCooldowns) {
|
if (nCooldowns) {
|
||||||
clearTimeout(QR.cooldown.timeout);
|
clearTimeout(QR.cooldown.timeout);
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.10.3' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.10.4' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.10.3' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.10.4' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"version": "1.13.10.3",
|
"version": "1.13.10.4",
|
||||||
"date": "2017-07-26T06:11:58.491Z"
|
"date": "2017-07-29T05:40:52.111Z"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user