diff --git a/CHANGELOG.md b/CHANGELOG.md index c25b720df..3baf8e05f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0). +### v1.11.10 + +**v1.11.10.0** *(2015-08-20)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.10.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.10.0/builds/4chan-X-noupdate.crx "Chromium version")] +- Based on v1.11.9.2. +- Support [port of Greasemonkey 3 to Pale Moon](https://github.com/janekptacijarabaci/greasemonkey/releases/latest). +- Fix bug causing updateless versions of userscript to check for and install updates. + ### v1.11.9 **v1.11.9.4** *(2015-08-22)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.4/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 053a1e713..c91cac904 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -304,6 +304,7 @@ module.exports = (grunt) -> GM_xmlhttpRequest: true GM_info: true cloneInto: true + unsafeWindow: true chrome: true script: 'tmp-<%= pkg.type %>/*.js' diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index fcd923118..1cba614b6 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 b14da23b1..104f4874c 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.9.4 +// @version 1.11.10.0 // @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 4d6b50029..ef284456d 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.9.4 +// @version 1.11.10.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -412,7 +412,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.9.4', + VERSION: '1.11.10.0', NAMESPACE: '4chan X.', boards: {} }; @@ -802,6 +802,46 @@ })); }; + (function() { + var clone, err, ref, unsafeConstructors; + if (!(/PaleMoon\//.test(navigator.userAgent) && +(typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.version) != null ? ref.split('.')[0] : void 0 : void 0) >= 2 && typeof cloneInto === 'undefined')) { + return; + } + try { + return new CustomEvent('x', { + detail: {} + }); + } catch (_error) { + err = _error; + unsafeConstructors = { + Object: unsafeWindow.Object, + Array: unsafeWindow.Array + }; + clone = function(obj) { + var constructor, key, obj2, val; + if ((obj != null) && typeof obj === 'object' && (constructor = unsafeConstructors[obj.constructor.name])) { + obj2 = new constructor(); + for (key in obj) { + val = obj[key]; + obj2[key] = clone(val); + } + return obj2; + } else { + return obj; + } + }; + return $.event = function(event, detail, root) { + if (root == null) { + root = d; + } + return root.dispatchEvent(new CustomEvent(event, { + bubbles: true, + detail: clone(detail) + })); + }; + } + })(); + $.open = typeof GM_openInTab !== "undefined" && GM_openInTab !== null ? GM_openInTab : function(url) { return window.open(url, '_blank'); }; @@ -7100,7 +7140,7 @@ return status.disabled = disabled || false; }, quote: function(e) { - var ancestor, caretPos, com, frag, index, insideCode, k, len1, len2, len3, len4, len5, len6, node, post, q, range, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, sel, text, thread, u, v, y, z; + var ancestor, caretPos, com, frag, index, insideCode, k, len1, len2, len3, len4, len5, len6, node, post, q, range, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, sel, text, thread, u, v, w, y; if (e != null) { e.preventDefault(); } @@ -7145,13 +7185,13 @@ $.replace(node, [$.tn('[code]')].concat(slice.call(node.childNodes), [$.tn('[/code]')])); } ref4 = $$('.linkify[data-original]', frag); - for (y = 0, len5 = ref4.length; y < len5; y++) { - node = ref4[y]; + for (w = 0, len5 = ref4.length; w < len5; w++) { + node = ref4[w]; $.replace(node, $.tn(node.dataset.original)); } ref5 = $$('.embedder', frag); - for (z = 0, len6 = ref5.length; z < len6; z++) { - node = ref5[z]; + for (y = 0, len6 = ref5.length; y < len6; y++) { + node = ref5[y]; if (((ref6 = node.previousSibling) != null ? ref6.nodeValue : void 0) === ' ') { $.rm(node.previousSibling); } @@ -7814,7 +7854,7 @@ initNoscript: function() { this.noscript = true; this.images = $$('.fbc-payload-imageselect > input'); - if (this.images.length !== 9) { + if (!this.images.length) { return; } $.addStyle(this.cssNoscript); @@ -7830,7 +7870,7 @@ img = ref[k]; img.tabIndex = 0; } - if (this.images.length === 9) { + if (this.images.length) { return this.addTooltips(this.images); } }, @@ -7878,36 +7918,36 @@ } }, keybinds: function(e) { - var dx, i, key, last, n, reload, verify, w, x; + var dx, i, key, reload, verify, x; if (!(this.images && doc.contains(this.images[0]))) { return; } - n = this.images.length; - w = Math.round(Math.sqrt(n)); - last = n + w - 1; reload = $('#recaptcha-reload-button, .fbc-button-reload'); verify = $('#recaptcha-verify-button, .fbc-button-verify > input'); x = this.images.indexOf(d.activeElement); if (x < 0) { - x = d.activeElement === verify ? last : n; + x = d.activeElement === verify ? 11 : 9; } key = Keybinds.keyCode(e); - if (!this.noscript && key === 'Space' && x < n) { + if (!this.noscript && key === 'Space' && x < 9) { this.images[x].click(); - } else if (n === 9 && (i = this.imageKeys.indexOf(key)) >= 0) { + } else if ((i = this.imageKeys.indexOf(key)) >= 0) { this.images[i % 9].click(); verify.focus(); } else if (dx = { - 'Up': n, - 'Down': w, - 'Left': last, + 'Up': 9, + 'Down': 3, + 'Left': 11, 'Right': 1 }[key]) { - x = (x + dx) % (n + w); - if ((n < x && x < last)) { - x = dx === last ? n : last; + x = (x + dx) % 12; + if (x === 10) { + x = dx === 11 ? 9 : 11; } - (this.images[x] || (x === n ? reload : void 0) || (x === last ? verify : void 0)).focus(); + (this.images[x] || { + 9: reload, + 11: verify + }[x]).focus(); } else { return; } @@ -14376,7 +14416,7 @@ } return Redirect.data = o; }, - archives: [{"uid":0,"name":"Moe","domain":"archive.moe","http":false,"https":true,"software":"foolfuuka","boards":["a","an","biz","c","co","diy","fit","gd","gif","h","i","int","jp","k","m","mlp","out","po","qa","r9k","s4s","sci","tg","tv","u","v","vg","vp","vr","wsg"],"files":["a","an","biz","c","co","diy","fit","gd","gif","h","i","int","jp","k","m","mlp","out","po","qa","r9k","s4s","sci","tg","u","v","vg","vp","vr","wsg"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","f","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","f","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":4,"name":"Nyafuu Archive","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["c","d","e","i","lgbt","t","u"],"files":["c","d","e","i","lgbt","t","u"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","qa","w"],"files":["cgl","g","mu","qa","w"]},{"uid":10,"name":"warosu","domain":"warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.jp","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","qa","r","s","soc","toy","y"],"files":["asp","b","cm","h","hc","hm","n","p","qa","r","s","soc","toy","y"]},{"uid":22,"name":"not4plebs","domain":"totally.not4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["sp"],"files":["sp"]},{"uid":23,"name":"DesuStorage","domain":"4ch.archive.horse","http":false,"https":true,"software":"foolfuuka","boards":["mlp","qa"],"files":["mlp","qa"]},{"uid":24,"name":"fireden.net","domain":"boards.fireden.net","http":false,"https":true,"software":"foolfuuka","boards":["cm","ic","vg","y"],"files":["cm","ic","vg","y"]}], + archives: [{"uid":0,"name":"Moe","domain":"archive.moe","http":false,"https":true,"software":"foolfuuka","boards":["a","an","biz","c","co","diy","fit","gd","gif","h","i","int","jp","k","m","mlp","out","po","qa","r9k","s4s","sci","tg","tv","u","v","vg","vp","vr","wsg"],"files":["a","an","biz","c","co","diy","fit","gd","gif","h","i","int","jp","k","m","mlp","out","po","qa","r9k","s4s","sci","tg","u","v","vg","vp","vr","wsg"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","f","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","f","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":4,"name":"Nyafuu Archive","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["c","d","e","i","lgbt","t","u"],"files":["c","d","e","i","lgbt","t","u"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","qa","w"],"files":["cgl","g","mu","qa","w"]},{"uid":10,"name":"warosu","domain":"warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.jp","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","qa","r","s","soc","toy","y"],"files":["asp","b","cm","h","hc","hm","n","p","qa","r","s","soc","toy","y"]},{"uid":22,"name":"not4plebs","domain":"totally.not4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["sp"],"files":["sp"]},{"uid":23,"name":"DesuStorage","domain":"archive.desustorage.org","http":false,"https":true,"software":"foolfuuka","boards":["mlp","qa"],"files":["mlp","qa"]},{"uid":24,"name":"fireden.net","domain":"boards.fireden.net","http":false,"https":true,"software":"foolfuuka","boards":["cm","ic","vg","y"],"files":["cm","ic","vg","y"]}], to: function(dest, data) { var archive; archive = (dest === 'search' || dest === 'board' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; @@ -16783,7 +16823,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var aa, applyCSS, archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, k, len1, len2, len3, len4, len5, len6, len7, name, o, q, ref, ref1, ref2, ref3, ref4, ref5, ref6, row, rows, software, ta, table, u, v, warning, withCredentials, y, z; + var applyCSS, archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, k, len1, len2, len3, len4, len5, len6, len7, name, o, q, ref, ref1, ref2, ref3, ref4, ref5, ref6, row, rows, software, ta, table, u, v, w, warning, withCredentials, y, z; $.extend(section, { innerHTML: "