diff --git a/CHANGELOG.md b/CHANGELOG.md index d20a9d6f2..95d2632fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### v1.13.14 +**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. + **v1.13.14.6** *(2017-11-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.6/builds/4chan-X-noupdate.crx)] - Turn 'Force Noscript Captcha for v1' off by default in GM4 due to missing frame support. - Fix bugs related to 4chan's ads. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 22d557a27..ef7d67cac 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 016b5a9aa..50ca283c2 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.6 +// @version 1.13.14.7 // @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 6cc341344..419516e54 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.6 +// @version 1.13.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.6', + VERSION: '1.13.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -4491,10 +4491,15 @@ $ = (function() { }; $.ajax = (function() { - var lastModified; + var lastModified, pageXHR; lastModified = {}; + if (window.wrappedJSObject && !XMLHttpRequest.wrappedJSObject) { + pageXHR = XPCNativeWrapper(window.wrappedJSObject.XMLHttpRequest); + } else { + pageXHR = XMLHttpRequest; + } return function(url, options, extra) { - var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified, xhr; + var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified; if (options == null) { options = {}; } @@ -4511,8 +4516,7 @@ $ = (function() { if ($.engine === 'blink' && whenModified) { url += "?s=" + whenModified; } - xhr = XMLHttpRequest; - r = new xhr(); + r = new pageXHR(); type || (type = form && 'post' || 'get'); try { r.open(type, url, true); @@ -24676,7 +24680,21 @@ Main = (function() { return; } return $.asap(docSet, function() { - var ref3, val; + 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); + } if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 6c60c0962..985d0799e 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 8b4e836f6..c54e133f0 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.6 +// @version 1.13.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.6', + VERSION: '1.13.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -4491,10 +4491,15 @@ $ = (function() { }; $.ajax = (function() { - var lastModified; + var lastModified, pageXHR; lastModified = {}; + if (window.wrappedJSObject && !XMLHttpRequest.wrappedJSObject) { + pageXHR = XPCNativeWrapper(window.wrappedJSObject.XMLHttpRequest); + } else { + pageXHR = XMLHttpRequest; + } return function(url, options, extra) { - var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified, xhr; + var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified; if (options == null) { options = {}; } @@ -4511,8 +4516,7 @@ $ = (function() { if ($.engine === 'blink' && whenModified) { url += "?s=" + whenModified; } - xhr = XMLHttpRequest; - r = new xhr(); + r = new pageXHR(); type || (type = form && 'post' || 'get'); try { r.open(type, url, true); @@ -24676,7 +24680,21 @@ Main = (function() { return; } return $.asap(docSet, function() { - var ref3, val; + 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); + } if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 2f38e6408..266818e72 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 d7d4f0d8f..fc621dfad 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.6 +// @version 1.13.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ddee1004e..f0577fb81 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.6 +// @version 1.13.14.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -159,7 +159,7 @@ docSet = function() { }; g = { - VERSION: '1.13.14.6', + VERSION: '1.13.14.7', NAMESPACE: '4chan X.', boards: {} }; @@ -4491,10 +4491,15 @@ $ = (function() { }; $.ajax = (function() { - var lastModified; + var lastModified, pageXHR; lastModified = {}; + if (window.wrappedJSObject && !XMLHttpRequest.wrappedJSObject) { + pageXHR = XPCNativeWrapper(window.wrappedJSObject.XMLHttpRequest); + } else { + pageXHR = XMLHttpRequest; + } return function(url, options, extra) { - var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified, xhr; + var err, event, form, j, len, r, ref, ref1, type, upCallbacks, whenModified; if (options == null) { options = {}; } @@ -4511,8 +4516,7 @@ $ = (function() { if ($.engine === 'blink' && whenModified) { url += "?s=" + whenModified; } - xhr = XMLHttpRequest; - r = new xhr(); + r = new pageXHR(); type || (type = form && 'post' || 'get'); try { r.open(type, url, true); @@ -24676,7 +24680,21 @@ Main = (function() { return; } return $.asap(docSet, function() { - var ref3, val; + 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); + } if ($.cantSet) { } else if (items.previousversion == null) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 4c8568f11..836218e0d 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 5b1e74873..a4e4c1aa2 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.6", + "version": "1.13.14.7", "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 56bbf1d11..e62172769 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 b51231e38..2e9ac52e4 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.13.14.6", + "version": "1.13.14.7", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index f4a9bd907..6d53cb3ab 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 3765104a5..4570dffed 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.13.14.6", - "date": "2017-11-05T01:38:05.709Z" + "version": "1.13.14.7", + "date": "2017-11-15T09:14:52.788Z" } \ No newline at end of file