diff --git a/CHANGELOG.md b/CHANGELOG.md index 95d2632fd..9dbdc2290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### v1.13.14 +**v1.13.14.8** *(2017-11-16)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.8/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.8/builds/4chan-X-noupdate.crx)] +- Yet more Greasemonkey 4 related fixes. + **v1.13.14.7** *(2017-11-15)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.7/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.7/builds/4chan-X-noupdate.crx)] - More Greasemonkey 4 related fixes. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index ef7d67cac..11aff3eef 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 50ca283c2..e5dd19907 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.13.14.7 +// @version 1.13.14.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index 419516e54..2c512d08d 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.13.14.7 +// @version 1.13.14.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.7', + VERSION: '1.13.14.8', NAMESPACE: '4chan X.', boards: {} }; @@ -11368,7 +11368,7 @@ Settings = (function() { } }, upgrade: function(data, version) { - var addCSS, addSauces, boardID, changes, compareString, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, value; + var addCSS, addSauces, boardID, changes, compareString, corrupted, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, val, val2, value; changes = {}; set = function(key, value) { return data[key] = changes[key] = value; @@ -11396,9 +11396,35 @@ Settings = (function() { return set('usercss', css + '\n\n' + data['usercss']); } }; + if ((corrupted = version[0] === '"')) { + try { + version = JSON.parse(version); + } catch (_error) {} + } compareString = version.replace(/\d+/g, function(x) { return ('0000' + x).slice(-5); }); + if (compareString < '00001.00013.00014.00008') { + for (key in data) { + val = data[key]; + if (!(typeof val === 'string' && typeof Conf[key] !== 'string' && (key !== 'Index Sort' && key !== 'Last Long Reply Thresholds 0' && key !== 'Last Long Reply Thresholds 1'))) { + continue; + } + corrupted = true; + break; + } + } + if (corrupted) { + for (key in data) { + val = data[key]; + if (typeof val === 'string') { + try { + val2 = JSON.parse(val); + set(key, val2); + } catch (_error) {} + } + } + } if (compareString < '00001.00011.00008.00000') { if (data['Fixed Thread Watcher'] == null) { set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true); @@ -20141,6 +20167,9 @@ Captcha = {}; if (captchas == null) { captchas = []; } + if (!(captchas instanceof Array)) { + captchas = []; + } this.captchas = captchas; return this.count(); }, @@ -24680,21 +24709,7 @@ Main = (function() { return; } return $.asap(docSet, function() { - var changes, ref3, val, val2; - if (typeof items.watchedThreads === 'string') { - changes = {}; - for (key in items) { - val = items[key]; - if (typeof val === 'string') { - try { - val2 = JSON.parse(val); - changes[key] = val2; - } catch (_error) {} - } - } - $.extend(items, changes); - $.set(changes); - } + var ref3, val; if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 985d0799e..d6601cb0a 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 c54e133f0..0440f3e0b 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.14.7 +// @version 1.13.14.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.7', + VERSION: '1.13.14.8', NAMESPACE: '4chan X.', boards: {} }; @@ -11368,7 +11368,7 @@ Settings = (function() { } }, upgrade: function(data, version) { - var addCSS, addSauces, boardID, changes, compareString, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, value; + var addCSS, addSauces, boardID, changes, compareString, corrupted, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, val, val2, value; changes = {}; set = function(key, value) { return data[key] = changes[key] = value; @@ -11396,9 +11396,35 @@ Settings = (function() { return set('usercss', css + '\n\n' + data['usercss']); } }; + if ((corrupted = version[0] === '"')) { + try { + version = JSON.parse(version); + } catch (_error) {} + } compareString = version.replace(/\d+/g, function(x) { return ('0000' + x).slice(-5); }); + if (compareString < '00001.00013.00014.00008') { + for (key in data) { + val = data[key]; + if (!(typeof val === 'string' && typeof Conf[key] !== 'string' && (key !== 'Index Sort' && key !== 'Last Long Reply Thresholds 0' && key !== 'Last Long Reply Thresholds 1'))) { + continue; + } + corrupted = true; + break; + } + } + if (corrupted) { + for (key in data) { + val = data[key]; + if (typeof val === 'string') { + try { + val2 = JSON.parse(val); + set(key, val2); + } catch (_error) {} + } + } + } if (compareString < '00001.00011.00008.00000') { if (data['Fixed Thread Watcher'] == null) { set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true); @@ -20141,6 +20167,9 @@ Captcha = {}; if (captchas == null) { captchas = []; } + if (!(captchas instanceof Array)) { + captchas = []; + } this.captchas = captchas; return this.count(); }, @@ -24680,21 +24709,7 @@ Main = (function() { return; } return $.asap(docSet, function() { - var changes, ref3, val, val2; - if (typeof items.watchedThreads === 'string') { - changes = {}; - for (key in items) { - val = items[key]; - if (typeof val === 'string') { - try { - val2 = JSON.parse(val); - changes[key] = val2; - } catch (_error) {} - } - } - $.extend(items, changes); - $.set(changes); - } + var ref3, val; if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 266818e72..4076485cd 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 fc621dfad..d7106f8f9 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.14.7 +// @version 1.13.14.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f0577fb81..7d3a38868 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.14.7 +// @version 1.13.14.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.7', + VERSION: '1.13.14.8', NAMESPACE: '4chan X.', boards: {} }; @@ -11368,7 +11368,7 @@ Settings = (function() { } }, upgrade: function(data, version) { - var addCSS, addSauces, boardID, changes, compareString, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, value; + var addCSS, addSauces, boardID, changes, compareString, corrupted, j, k, key, len, len1, list, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, set, setD, type, uids, val, val2, value; changes = {}; set = function(key, value) { return data[key] = changes[key] = value; @@ -11396,9 +11396,35 @@ Settings = (function() { return set('usercss', css + '\n\n' + data['usercss']); } }; + if ((corrupted = version[0] === '"')) { + try { + version = JSON.parse(version); + } catch (_error) {} + } compareString = version.replace(/\d+/g, function(x) { return ('0000' + x).slice(-5); }); + if (compareString < '00001.00013.00014.00008') { + for (key in data) { + val = data[key]; + if (!(typeof val === 'string' && typeof Conf[key] !== 'string' && (key !== 'Index Sort' && key !== 'Last Long Reply Thresholds 0' && key !== 'Last Long Reply Thresholds 1'))) { + continue; + } + corrupted = true; + break; + } + } + if (corrupted) { + for (key in data) { + val = data[key]; + if (typeof val === 'string') { + try { + val2 = JSON.parse(val); + set(key, val2); + } catch (_error) {} + } + } + } if (compareString < '00001.00011.00008.00000') { if (data['Fixed Thread Watcher'] == null) { set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true); @@ -20141,6 +20167,9 @@ Captcha = {}; if (captchas == null) { captchas = []; } + if (!(captchas instanceof Array)) { + captchas = []; + } this.captchas = captchas; return this.count(); }, @@ -24680,21 +24709,7 @@ Main = (function() { return; } return $.asap(docSet, function() { - var changes, ref3, val, val2; - if (typeof items.watchedThreads === 'string') { - changes = {}; - for (key in items) { - val = items[key]; - if (typeof val === 'string') { - try { - val2 = JSON.parse(val); - changes[key] = val2; - } catch (_error) {} - } - } - $.extend(items, changes); - $.set(changes); - } + var ref3, val; if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 836218e0d..520ced05d 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.json b/builds/updates-beta.json index a4e4c1aa2..670a61980 100644 --- a/builds/updates-beta.json +++ b/builds/updates-beta.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.13.14.7", + "version": "1.13.14.8", "update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx" } ] diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index e62172769..79eedf3f2 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.json b/builds/updates.json index 2e9ac52e4..6dcfc3598 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.13.14.7", + "version": "1.13.14.8", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index 6d53cb3ab..d21d6369c 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 4570dffed..7de1c3979 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.13.14.7", - "date": "2017-11-15T09:14:52.788Z" + "version": "1.13.14.8", + "date": "2017-11-16T05:51:41.932Z" } \ No newline at end of file