Release 4chan X v1.11.3.0.
This commit is contained in:
parent
a34c4a7b73
commit
948cea6632
@ -2,6 +2,13 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
|
||||
|
||||
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
|
||||
|
||||
### v1.11.3
|
||||
|
||||
**v1.11.3.0** *(2015-07-04)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.0/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||
- Based on v1.11.2.4.
|
||||
- Improved Tampermonkey and WebKit support.
|
||||
- Minor bugfixes.
|
||||
|
||||
### v1.11.2
|
||||
|
||||
**v1.11.2.4** *(2015-07-03)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.4/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.11.2.4
|
||||
// @version 1.11.3.0
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -28,6 +28,7 @@
|
||||
// @grant GM_setValue
|
||||
// @grant GM_deleteValue
|
||||
// @grant GM_listValues
|
||||
// @grant GM_addValueChangeListener
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.11.2.4
|
||||
// @version 1.11.3.0
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -29,6 +29,7 @@
|
||||
// @grant GM_setValue
|
||||
// @grant GM_deleteValue
|
||||
// @grant GM_listValues
|
||||
// @grant GM_addValueChangeListener
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
@ -411,7 +412,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.11.2.4',
|
||||
VERSION: '1.11.3.0',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -892,10 +893,32 @@
|
||||
|
||||
$.syncing = {};
|
||||
|
||||
$.oldValue = {};
|
||||
|
||||
if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.getValue = GM_getValue;
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.setValue = GM_setValue;
|
||||
$.deleteValue = GM_deleteValue;
|
||||
} else if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
GM_setValue(key, val);
|
||||
if (key in $.syncing) {
|
||||
@ -910,13 +933,8 @@
|
||||
return delete localStorage[key];
|
||||
}
|
||||
};
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
if (key in $.syncing) {
|
||||
$.oldValue[key] = val;
|
||||
@ -929,52 +947,55 @@
|
||||
}
|
||||
return delete localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key);
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key);
|
||||
}
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.sync = function(key, cb) {
|
||||
return $.syncing[key] = GM_addValueChangeListener(g.NAMESPACE + key, function(key2, oldValue, newValue, remote) {
|
||||
if (remote) {
|
||||
if (newValue !== void 0) {
|
||||
newValue = JSON.parse(newValue);
|
||||
}
|
||||
return cb(newValue, key);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
$.forceSync = function() {};
|
||||
} else {
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
})();
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key.slice(g.NAMESPACE.length));
|
||||
}
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
$["delete"] = function(keys) {
|
||||
var k, key, len1;
|
||||
@ -1507,7 +1528,7 @@
|
||||
|
||||
Post.prototype.resurrect = function() {
|
||||
var clone, k, len1, len2, q, quotelink, ref, ref1, strong;
|
||||
delete this.isDead;
|
||||
this.isDead = false;
|
||||
$.rmClass(this.nodes.root, 'deleted-post');
|
||||
strong = $('strong.warning', this.nodes.info);
|
||||
if (this.file && this.file.isDead) {
|
||||
@ -6975,7 +6996,7 @@
|
||||
notif.onclick = function() {
|
||||
return window.focus();
|
||||
};
|
||||
if (typeof chrome !== "undefined" && chrome !== null) {
|
||||
if ($.engine !== 'gecko') {
|
||||
notif.onclose = function() {
|
||||
return notice.close();
|
||||
};
|
||||
@ -7382,7 +7403,7 @@
|
||||
window.addEventListener('focus', QR.focus, true);
|
||||
window.addEventListener('blur', QR.focus, true);
|
||||
$.on(d, 'click', QR.focus);
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
nodes.pasteArea.hidden = false;
|
||||
new MutationObserver(QR.pasteFF).observe(nodes.pasteArea, {
|
||||
childList: true
|
||||
@ -7400,7 +7421,7 @@
|
||||
event = node.nodeName === 'SELECT' ? 'change' : 'input';
|
||||
$.on(nodes[name], event, save);
|
||||
}
|
||||
if ((typeof chrome === "undefined" || chrome === null) && Conf['Remember QR Size']) {
|
||||
if ($.engine === 'gecko' && Conf['Remember QR Size']) {
|
||||
$.get('QR Size', '', function(item) {
|
||||
return nodes.com.style.cssText = item['QR Size'];
|
||||
});
|
||||
@ -10288,7 +10309,7 @@
|
||||
$.off(video, 'mouseover', handler);
|
||||
t = new Date().getTime();
|
||||
return $.asap((function() {
|
||||
return (typeof chrome !== "undefined" && chrome !== null) || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
return $.engine !== 'gecko' || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
}), function() {
|
||||
return video.controls = true;
|
||||
});
|
||||
@ -10931,7 +10952,7 @@
|
||||
clone.file.thumb.preload = 'auto';
|
||||
}
|
||||
thumb.preload = 'auto';
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
$.on(thumb, 'loadeddata', function() {
|
||||
return this.removeAttribute('poster');
|
||||
});
|
||||
@ -14144,9 +14165,7 @@
|
||||
if (Conf['Unread Favicon']) {
|
||||
isDead = Unread.thread.isDead;
|
||||
Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default'];
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -15294,7 +15313,7 @@
|
||||
if (!Conf['Keybinds']) {
|
||||
return;
|
||||
}
|
||||
for (hotkey in Conf.hotkeys) {
|
||||
for (hotkey in Config.hotkeys) {
|
||||
$.sync(hotkey, Keybinds.sync);
|
||||
}
|
||||
init = function() {
|
||||
@ -16315,7 +16334,7 @@
|
||||
div = $.el('div', {
|
||||
innerHTML: "<label><input type=\"checkbox\" name=\"" + E(key) + "\">" + E(key) + "</label><span class=\"description\">: " + E(description) + "</span>"
|
||||
});
|
||||
if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
|
||||
if ($.engine !== 'gecko' && key === 'Remember QR Size') {
|
||||
div.hidden = true;
|
||||
}
|
||||
input = $('input', div);
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.11.2.4
|
||||
// @version 1.11.3.0
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -29,6 +29,7 @@
|
||||
// @grant GM_setValue
|
||||
// @grant GM_deleteValue
|
||||
// @grant GM_listValues
|
||||
// @grant GM_addValueChangeListener
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
@ -410,7 +411,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.11.2.4',
|
||||
VERSION: '1.11.3.0',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -891,10 +892,32 @@
|
||||
|
||||
$.syncing = {};
|
||||
|
||||
$.oldValue = {};
|
||||
|
||||
if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.getValue = GM_getValue;
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.setValue = GM_setValue;
|
||||
$.deleteValue = GM_deleteValue;
|
||||
} else if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
GM_setValue(key, val);
|
||||
if (key in $.syncing) {
|
||||
@ -909,13 +932,8 @@
|
||||
return delete localStorage[key];
|
||||
}
|
||||
};
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
if (key in $.syncing) {
|
||||
$.oldValue[key] = val;
|
||||
@ -928,52 +946,55 @@
|
||||
}
|
||||
return delete localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key);
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key);
|
||||
}
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.sync = function(key, cb) {
|
||||
return $.syncing[key] = GM_addValueChangeListener(g.NAMESPACE + key, function(key2, oldValue, newValue, remote) {
|
||||
if (remote) {
|
||||
if (newValue !== void 0) {
|
||||
newValue = JSON.parse(newValue);
|
||||
}
|
||||
return cb(newValue, key);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
$.forceSync = function() {};
|
||||
} else {
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
})();
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key.slice(g.NAMESPACE.length));
|
||||
}
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
$["delete"] = function(keys) {
|
||||
var k, key, len1;
|
||||
@ -1506,7 +1527,7 @@
|
||||
|
||||
Post.prototype.resurrect = function() {
|
||||
var clone, k, len1, len2, q, quotelink, ref, ref1, strong;
|
||||
delete this.isDead;
|
||||
this.isDead = false;
|
||||
$.rmClass(this.nodes.root, 'deleted-post');
|
||||
strong = $('strong.warning', this.nodes.info);
|
||||
if (this.file && this.file.isDead) {
|
||||
@ -6974,7 +6995,7 @@
|
||||
notif.onclick = function() {
|
||||
return window.focus();
|
||||
};
|
||||
if (typeof chrome !== "undefined" && chrome !== null) {
|
||||
if ($.engine !== 'gecko') {
|
||||
notif.onclose = function() {
|
||||
return notice.close();
|
||||
};
|
||||
@ -7381,7 +7402,7 @@
|
||||
window.addEventListener('focus', QR.focus, true);
|
||||
window.addEventListener('blur', QR.focus, true);
|
||||
$.on(d, 'click', QR.focus);
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
nodes.pasteArea.hidden = false;
|
||||
new MutationObserver(QR.pasteFF).observe(nodes.pasteArea, {
|
||||
childList: true
|
||||
@ -7399,7 +7420,7 @@
|
||||
event = node.nodeName === 'SELECT' ? 'change' : 'input';
|
||||
$.on(nodes[name], event, save);
|
||||
}
|
||||
if ((typeof chrome === "undefined" || chrome === null) && Conf['Remember QR Size']) {
|
||||
if ($.engine === 'gecko' && Conf['Remember QR Size']) {
|
||||
$.get('QR Size', '', function(item) {
|
||||
return nodes.com.style.cssText = item['QR Size'];
|
||||
});
|
||||
@ -10287,7 +10308,7 @@
|
||||
$.off(video, 'mouseover', handler);
|
||||
t = new Date().getTime();
|
||||
return $.asap((function() {
|
||||
return (typeof chrome !== "undefined" && chrome !== null) || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
return $.engine !== 'gecko' || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
}), function() {
|
||||
return video.controls = true;
|
||||
});
|
||||
@ -10930,7 +10951,7 @@
|
||||
clone.file.thumb.preload = 'auto';
|
||||
}
|
||||
thumb.preload = 'auto';
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
$.on(thumb, 'loadeddata', function() {
|
||||
return this.removeAttribute('poster');
|
||||
});
|
||||
@ -14143,9 +14164,7 @@
|
||||
if (Conf['Unread Favicon']) {
|
||||
isDead = Unread.thread.isDead;
|
||||
Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default'];
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -15293,7 +15312,7 @@
|
||||
if (!Conf['Keybinds']) {
|
||||
return;
|
||||
}
|
||||
for (hotkey in Conf.hotkeys) {
|
||||
for (hotkey in Config.hotkeys) {
|
||||
$.sync(hotkey, Keybinds.sync);
|
||||
}
|
||||
init = function() {
|
||||
@ -16314,7 +16333,7 @@
|
||||
div = $.el('div', {
|
||||
innerHTML: "<label><input type=\"checkbox\" name=\"" + E(key) + "\">" + E(key) + "</label><span class=\"description\">: " + E(description) + "</span>"
|
||||
});
|
||||
if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
|
||||
if ($.engine !== 'gecko' && key === 'Remember QR Size') {
|
||||
div.hidden = true;
|
||||
}
|
||||
input = $('input', div);
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.11.2.4
|
||||
// @version 1.11.3.0
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -28,6 +28,7 @@
|
||||
// @grant GM_setValue
|
||||
// @grant GM_deleteValue
|
||||
// @grant GM_listValues
|
||||
// @grant GM_addValueChangeListener
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.11.2.4
|
||||
// @version 1.11.3.0
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -29,6 +29,7 @@
|
||||
// @grant GM_setValue
|
||||
// @grant GM_deleteValue
|
||||
// @grant GM_listValues
|
||||
// @grant GM_addValueChangeListener
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
@ -411,7 +412,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.11.2.4',
|
||||
VERSION: '1.11.3.0',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -892,10 +893,32 @@
|
||||
|
||||
$.syncing = {};
|
||||
|
||||
$.oldValue = {};
|
||||
|
||||
if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.getValue = GM_getValue;
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.setValue = GM_setValue;
|
||||
$.deleteValue = GM_deleteValue;
|
||||
} else if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
GM_setValue(key, val);
|
||||
if (key in $.syncing) {
|
||||
@ -910,13 +933,8 @@
|
||||
return delete localStorage[key];
|
||||
}
|
||||
};
|
||||
$.listValues = function() {
|
||||
return GM_listValues();
|
||||
};
|
||||
} else {
|
||||
$.getValue = function(key) {
|
||||
return localStorage[key];
|
||||
};
|
||||
$.oldValue = {};
|
||||
$.setValue = function(key, val) {
|
||||
if (key in $.syncing) {
|
||||
$.oldValue[key] = val;
|
||||
@ -929,52 +947,55 @@
|
||||
}
|
||||
return delete localStorage[key];
|
||||
};
|
||||
$.listValues = function() {
|
||||
var key, results;
|
||||
results = [];
|
||||
for (key in localStorage) {
|
||||
if (key.slice(0, g.NAMESPACE.length) === g.NAMESPACE) {
|
||||
results.push(key);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
}
|
||||
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key);
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key);
|
||||
}
|
||||
if (typeof GM_addValueChangeListener !== "undefined" && GM_addValueChangeListener !== null) {
|
||||
$.sync = function(key, cb) {
|
||||
return $.syncing[key] = GM_addValueChangeListener(g.NAMESPACE + key, function(key2, oldValue, newValue, remote) {
|
||||
if (remote) {
|
||||
if (newValue !== void 0) {
|
||||
newValue = JSON.parse(newValue);
|
||||
}
|
||||
return cb(newValue, key);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
$.forceSync = function() {};
|
||||
} else {
|
||||
$.sync = function(key, cb) {
|
||||
key = g.NAMESPACE + key;
|
||||
$.syncing[key] = cb;
|
||||
return $.oldValue[key] = $.getValue(key);
|
||||
};
|
||||
})();
|
||||
(function() {
|
||||
var onChange;
|
||||
onChange = function(key) {
|
||||
var cb, newValue;
|
||||
if (!(cb = $.syncing[key])) {
|
||||
return;
|
||||
}
|
||||
newValue = $.getValue(key);
|
||||
if (newValue === $.oldValue[key]) {
|
||||
return;
|
||||
}
|
||||
if (newValue != null) {
|
||||
$.oldValue[key] = newValue;
|
||||
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
|
||||
} else {
|
||||
delete $.oldValue[key];
|
||||
return cb(void 0, key.slice(g.NAMESPACE.length));
|
||||
}
|
||||
};
|
||||
$.on(window, 'storage', function(arg) {
|
||||
var key;
|
||||
key = arg.key;
|
||||
return onChange(key);
|
||||
});
|
||||
return $.forceSync = function(key) {
|
||||
return onChange(g.NAMESPACE + key);
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
$["delete"] = function(keys) {
|
||||
var k, key, len1;
|
||||
@ -1507,7 +1528,7 @@
|
||||
|
||||
Post.prototype.resurrect = function() {
|
||||
var clone, k, len1, len2, q, quotelink, ref, ref1, strong;
|
||||
delete this.isDead;
|
||||
this.isDead = false;
|
||||
$.rmClass(this.nodes.root, 'deleted-post');
|
||||
strong = $('strong.warning', this.nodes.info);
|
||||
if (this.file && this.file.isDead) {
|
||||
@ -6975,7 +6996,7 @@
|
||||
notif.onclick = function() {
|
||||
return window.focus();
|
||||
};
|
||||
if (typeof chrome !== "undefined" && chrome !== null) {
|
||||
if ($.engine !== 'gecko') {
|
||||
notif.onclose = function() {
|
||||
return notice.close();
|
||||
};
|
||||
@ -7382,7 +7403,7 @@
|
||||
window.addEventListener('focus', QR.focus, true);
|
||||
window.addEventListener('blur', QR.focus, true);
|
||||
$.on(d, 'click', QR.focus);
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
nodes.pasteArea.hidden = false;
|
||||
new MutationObserver(QR.pasteFF).observe(nodes.pasteArea, {
|
||||
childList: true
|
||||
@ -7400,7 +7421,7 @@
|
||||
event = node.nodeName === 'SELECT' ? 'change' : 'input';
|
||||
$.on(nodes[name], event, save);
|
||||
}
|
||||
if ((typeof chrome === "undefined" || chrome === null) && Conf['Remember QR Size']) {
|
||||
if ($.engine === 'gecko' && Conf['Remember QR Size']) {
|
||||
$.get('QR Size', '', function(item) {
|
||||
return nodes.com.style.cssText = item['QR Size'];
|
||||
});
|
||||
@ -10288,7 +10309,7 @@
|
||||
$.off(video, 'mouseover', handler);
|
||||
t = new Date().getTime();
|
||||
return $.asap((function() {
|
||||
return (typeof chrome !== "undefined" && chrome !== null) || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
return $.engine !== 'gecko' || (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || new Date().getTime() >= t + 1000;
|
||||
}), function() {
|
||||
return video.controls = true;
|
||||
});
|
||||
@ -10931,7 +10952,7 @@
|
||||
clone.file.thumb.preload = 'auto';
|
||||
}
|
||||
thumb.preload = 'auto';
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
if ($.engine === 'gecko') {
|
||||
$.on(thumb, 'loadeddata', function() {
|
||||
return this.removeAttribute('poster');
|
||||
});
|
||||
@ -14144,9 +14165,7 @@
|
||||
if (Conf['Unread Favicon']) {
|
||||
isDead = Unread.thread.isDead;
|
||||
Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default'];
|
||||
if (typeof chrome === "undefined" || chrome === null) {
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
return $.add(d.head, Favicon.el);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -15294,7 +15313,7 @@
|
||||
if (!Conf['Keybinds']) {
|
||||
return;
|
||||
}
|
||||
for (hotkey in Conf.hotkeys) {
|
||||
for (hotkey in Config.hotkeys) {
|
||||
$.sync(hotkey, Keybinds.sync);
|
||||
}
|
||||
init = function() {
|
||||
@ -16315,7 +16334,7 @@
|
||||
div = $.el('div', {
|
||||
innerHTML: "<label><input type=\"checkbox\" name=\"" + E(key) + "\">" + E(key) + "</label><span class=\"description\">: " + E(description) + "</span>"
|
||||
});
|
||||
if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
|
||||
if ($.engine !== 'gecko' && key === 'Remember QR Size') {
|
||||
div.hidden = true;
|
||||
}
|
||||
input = $('input', div);
|
||||
|
||||
Binary file not shown.
@ -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.11.2.4' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.11.3.0' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -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.11.2.4' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.11.3.0' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
"version": "1.11.2.4",
|
||||
"date": "2015-07-03T22:57:57.868Z",
|
||||
"version": "1.11.3.0",
|
||||
"date": "2015-07-04T20:11:44.204Z",
|
||||
"repo": "https://github.com/ccd0/4chan-x/",
|
||||
"page": "https://github.com/ccd0/4chan-x",
|
||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user