diff --git a/CHANGELOG.md b/CHANGELOG.md index 3baf8e05f..af1f86131 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.10 +**v1.11.10.1** *(2015-08-22)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.10.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.10.1/builds/4chan-X-noupdate.crx "Chromium version")] +- Merge v1.11.9.3: Try to support the new non-3x3 captchas. Note: not tested on non-3x3 captchas yet. +- Merge v1.11.9.4: Archive list update: desustorage.org -> archive.horse. +- Fix name of archive.horse as displayed in settings. +- Update settings import from loadletter fork. +- Settings import bugfixes. +- Fix posting image from URL in Pale Moon with patched GM3. + **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). diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 1cba614b6..511e76cff 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 104f4874c..a8a936582 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.10.0 +// @version 1.11.10.1 // @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 ef284456d..2aab43e35 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.10.0 +// @version 1.11.10.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -412,7 +412,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.10.0', + VERSION: '1.11.10.1', NAMESPACE: '4chan X.', boards: {} }; @@ -4995,6 +4995,7 @@ headers = {}; } workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); + workaround || (workaround = /PaleMoon\//.test(navigator.userAgent)); workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null); options = { method: "GET", @@ -7140,7 +7141,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, w, y; + 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; if (e != null) { e.preventDefault(); } @@ -7185,13 +7186,13 @@ $.replace(node, [$.tn('[code]')].concat(slice.call(node.childNodes), [$.tn('[/code]')])); } ref4 = $$('.linkify[data-original]', frag); - for (w = 0, len5 = ref4.length; w < len5; w++) { - node = ref4[w]; + for (y = 0, len5 = ref4.length; y < len5; y++) { + node = ref4[y]; $.replace(node, $.tn(node.dataset.original)); } ref5 = $$('.embedder', frag); - for (y = 0, len6 = ref5.length; y < len6; y++) { - node = ref5[y]; + for (z = 0, len6 = ref5.length; z < len6; z++) { + node = ref5[z]; if (((ref6 = node.previousSibling) != null ? ref6.nodeValue : void 0) === ' ') { $.rm(node.previousSibling); } @@ -7854,7 +7855,7 @@ initNoscript: function() { this.noscript = true; this.images = $$('.fbc-payload-imageselect > input'); - if (!this.images.length) { + if (this.images.length !== 9) { return; } $.addStyle(this.cssNoscript); @@ -7870,7 +7871,7 @@ img = ref[k]; img.tabIndex = 0; } - if (this.images.length) { + if (this.images.length === 9) { return this.addTooltips(this.images); } }, @@ -7918,36 +7919,36 @@ } }, keybinds: function(e) { - var dx, i, key, reload, verify, x; + var dx, i, key, last, n, reload, verify, w, 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 ? 11 : 9; + x = d.activeElement === verify ? last : n; } key = Keybinds.keyCode(e); - if (!this.noscript && key === 'Space' && x < 9) { + if (!this.noscript && key === 'Space' && x < n) { this.images[x].click(); - } else if ((i = this.imageKeys.indexOf(key)) >= 0) { + } else if (n === 9 && (i = this.imageKeys.indexOf(key)) >= 0) { this.images[i % 9].click(); verify.focus(); } else if (dx = { - 'Up': 9, - 'Down': 3, - 'Left': 11, + 'Up': n, + 'Down': w, + 'Left': last, 'Right': 1 }[key]) { - x = (x + dx) % 12; - if (x === 10) { - x = dx === 11 ? 9 : 11; + x = (x + dx) % (n + w); + if ((n < x && x < last)) { + x = dx === last ? n : last; } - (this.images[x] || { - 9: reload, - 11: verify - }[x]).focus(); + (this.images[x] || (x === n ? reload : void 0) || (x === last ? verify : void 0)).focus(); } else { return; } @@ -13962,20 +13963,6 @@ }); return ThreadWatcher.refresh(); }, - convert: function(oldFormat) { - var boardID, data, newFormat, threadID, threads; - newFormat = {}; - for (boardID in oldFormat) { - threads = oldFormat[boardID]; - for (threadID in threads) { - data = threads[threadID]; - (newFormat[boardID] || (newFormat[boardID] = {}))[threadID] = { - excerpt: data.textContent - }; - } - } - return newFormat; - }, menu: { refreshers: [], init: function() { @@ -14368,7 +14355,7 @@ Redirect = { init: function() { - var archive, archives, boardID, boards, data, files, id, k, len1, len2, name, o, q, record, ref, ref1, software, type, withCredentials; + var archive, archives, boardID, boards, data, files, id, k, len1, len2, name, o, q, record, ref, ref1, software, type, uid, withCredentials; o = { thread: {}, post: {}, @@ -14379,8 +14366,8 @@ ref = Redirect.archives; for (k = 0, len1 = ref.length; k < len1; k++) { data = ref[k]; - name = data.name, boards = data.boards, files = data.files, software = data.software, withCredentials = data.withCredentials; - archives[name] = data; + uid = data.uid, name = data.name, boards = data.boards, files = data.files, software = data.software, withCredentials = data.withCredentials; + archives[JSON.stringify(uid != null ? uid : name)] = data; for (q = 0, len2 = boards.length; q < len2; q++) { boardID = boards[q]; if (!withCredentials) { @@ -14404,9 +14391,9 @@ record = ref1[boardID]; for (type in record) { id = record[type]; - if (id === 'disabled') { + if (id === null) { delete o[type][boardID]; - } else if (archive = archives[id]) { + } else if (archive = archives[JSON.stringify(id)]) { boards = type === 'file' ? archive.files : archive.boards; if (indexOf.call(boards, boardID) >= 0) { o[type][boardID] = archive; @@ -14416,7 +14403,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":"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"]}], + 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":"archive.horse","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"]}], to: function(dest, data) { var archive; archive = (dest === 'search' || dest === 'board' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; @@ -16637,6 +16624,7 @@ if (!(file = this.files[0])) { return; } + this.value = null; output = $('.imp-exp-result'); if (!confirm('Your current settings will be entirely overwritten, are you sure?')) { output.textContent = 'Import aborted.'; @@ -16661,10 +16649,9 @@ }; return reader.readAsText(file); }, - loadSettings: function(data, cb) { - var convertSettings, key, ref, val, version; - version = data.version.split('.'); - if (version[0] === '2') { + convertFrom: { + loadletter: function(data) { + var base1, boardID, convertSettings, key, ref, ref1, threadData, threadID, threads, val; convertSettings = function(data, map) { var newKey, prevKey; for (prevKey in map) { @@ -16677,7 +16664,8 @@ return data; }; data = convertSettings(data, { - 'Disable 4chan\'s extension': '', + 'Disable 4chan\'s extension': 'Disable Native Extension', + 'Comment Auto-Expansion': '', 'Remove Slug': '', 'Check for Updates': '', 'Recursive Filtering': 'Recursive Hiding', @@ -16688,6 +16676,10 @@ 'Reveal Spoilers': 'Reveal Spoiler Thumbnails', 'Expand From Current': 'Expand from here', 'Post in Title': 'Thread Excerpt', + 'Current Page': 'Page Count in Stats', + 'Current Page Position': '', + 'Alternative captcha': 'Use Recaptcha v1', + 'Auto Submit': 'Post on Captcha Completion', 'Open Reply in New Tab': 'Open Post in New Tab', 'Remember QR size': 'Remember QR Size', 'Remember Subject': '', @@ -16753,13 +16745,73 @@ }); } } - data.Conf['WatchedThreads'] = data.WatchedThreads; + if (data.WatchedThreads) { + data.Conf['watchedThreads'] = { + boards: {} + }; + ref1 = data.WatchedThreads; + for (boardID in ref1) { + threads = ref1[boardID]; + for (threadID in threads) { + threadData = threads[threadID]; + ((base1 = data.Conf['watchedThreads'].boards)[boardID] || (base1[boardID] = {}))[threadID] = { + excerpt: threadData.textContent + }; + } + } + } + return data; } - if (data.Conf['WatchedThreads']) { - data.Conf['watchedThreads'] = { - boards: ThreadWatcher.convert(data.Conf['WatchedThreads']) - }; - delete data.Conf['WatchedThreads']; + }, + upgrade: function(data, version) { + var boardID, changes, compareString, name, record, ref, ref1, ref2, type, uids; + changes = {}; + compareString = version.replace(/\d+/g, function(x) { + return ('0000' + x).slice(-5); + }); + if (compareString < '00001.00011.00008.00000') { + if (data['Fixed Thread Watcher'] == null) { + changes['Fixed Thread Watcher'] = (ref = data['Toggleable Thread Watcher']) != null ? ref : true; + } + if (data['Exempt Archives from Encryption'] == null) { + changes['Exempt Archives from Encryption'] = (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false; + } + } + if (compareString < '00001.00011.00010.00001') { + if (data['selectedArchives'] != null) { + uids = { + "Moe": 0, + "4plebs Archive": 3, + "Nyafuu Archive": 4, + "Love is Over": 5, + "Rebecca Black Tech": 8, + "warosu": 10, + "fgts": 15, + "not4plebs": 22, + "DesuStorage": 23, + "fireden.net": 24, + "disabled": null + }; + changes['selectedArchives'] = data['selectedArchives']; + ref2 = changes['selectedArchives']; + for (boardID in ref2) { + record = ref2[boardID]; + for (type in record) { + name = record[type]; + if (name in uids) { + record[type] = uids[name]; + } + } + } + } + } + return changes; + }, + loadSettings: function(data, cb) { + if (data.version.split('.')[0] === '2') { + data = Settings.convertFrom.loadletter(data); + } else if (data.version !== g.VERSION) { + $.extend(data.Conf, Settings.upgrade(data.Conf, data.version)); } return $.clear(function(err) { if (err) { @@ -16823,7 +16875,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - 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; + var aa, applyCSS, archBoards, archive, 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, uid, v, warning, withCredentials, y, z; $.extend(section, { innerHTML: "