diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef3d27ab2..3b0f790e2 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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")]
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 0c081af44..51698749e 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 67224429b..9a3a9bf28 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -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
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index aeeca6045..e03357060 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -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: ": " + E(description) + ""
});
- if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
+ if ($.engine !== 'gecko' && key === 'Remember QR Size') {
div.hidden = true;
}
input = $('input', div);
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 1b28a9fd2..d655be62d 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index e56dfdd17..3e1f53aac 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -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: ": " + E(description) + ""
});
- if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
+ if ($.engine !== 'gecko' && key === 'Remember QR Size') {
div.hidden = true;
}
input = $('input', div);
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 5b3d4c907..7e2a14a04 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 868cd4206..b73cc4a13 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -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
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 08a293c51..e82a0b092 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -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: ": " + E(description) + ""
});
- if ((typeof chrome !== "undefined" && chrome !== null) && key === 'Remember QR Size') {
+ if ($.engine !== 'gecko' && key === 'Remember QR Size') {
div.hidden = true;
}
input = $('input', div);
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 7857672d7..abcd17c84 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index bd4bfeacb..4d7ab88b5 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index e6ae69b61..a91c5084a 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index 975189151..fb73b080a 100755
--- a/package.json
+++ b/package.json
@@ -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/",