diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b95b661..1735f6846 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ ### v1.13.1 +**v1.13.1.2** *(2016-11-08)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.1.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.1.2/builds/4chan-X-noupdate.crx)] +- Merge v1.13.0.23: Fix bug from v1.13.0.0 affecting the catalog sorting order of recently hidden/shown threads. +- Merge v1.13.0.23: Cosmetic fixes for bottom ad changes. +- Reply Pruning is no longer activated by default except in stickies. Added `Prune All Threads` option (default: false) to activate Reply Pruning by default in all threads. +- Reply Pruning will no longer be deactivated by `Scroll to Last Read Post` in order to unhide the last read post, or by following links to the OP. +- Add option for quick MD5-filtering button (`%f`) to File Info Formatting (Advanced settings tab). +- Add keybind for filtering image MD5s (default: `5`). +- (ihavenoface) Add Bing reverse image search to Sauce examples. +- Various minor bugfixes. + **v1.13.1.1** *(2016-11-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.1.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.1.1/builds/4chan-X-noupdate.crx)] - Fix bug causing replies to not immediately show when catalog thread is clicked. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 8f0fa8354..4b004e58f 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 846431642..450b9dd0d 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.1.1 +// @version 1.13.1.2 // @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 89fa526ec..1c9ce1922 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.1.1 +// @version 1.13.1.2 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -147,7 +147,7 @@ docSet = function() { }; g = { - VERSION: '1.13.1.1', + VERSION: '1.13.1.2', NAMESPACE: '4chan X.', boards: {} }; @@ -292,7 +292,8 @@ Config = (function() { 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], - 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] + 'Reply Pruning': [true, 'Add option in header menu to hide old replies in long threads. Activated by default in stickies.'], + 'Prune All Threads': [false, 'Activate Reply Pruning by default in all threads.', 1] }, 'Posting and Captchas': { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], @@ -374,7 +375,7 @@ Config = (function() { filesize: '', MD5: '' }, - sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", + sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", FappeT: { werk: false }, @@ -464,6 +465,7 @@ Config = (function() { 'Previous reply': ['k', 'Select previous reply.'], 'Deselect reply': ['Shift+d', 'Deselect reply.'], 'Hide': ['x', 'Hide thread.'], + 'Quick Filter MD5': ['5', 'Add the MD5 of the selected image to the filter list.'], 'Previous Post Quoting You': ['Alt+Up', 'Scroll to the previous post that quotes you.'], 'Next Post Quoting You': ['Alt+Down', 'Scroll to the next post that quotes you.'] }, @@ -1327,11 +1329,13 @@ body > div[style*=\" top: -10000px;\"] {\n\ }\n\ :root:not(.ads-loaded) .ad-plea,\n\ :root:not(.ads-loaded) hr.abovePostForm,\n\ -:root:not(.ads-loaded) .ad-plea-bottom + hr {\n\ +:root:not(.ads-loaded) .ad-plea-bottom + hr,\n\ +:root:not(.ads-loaded) #adg-ol + hr {\n\ display: none;\n\ }\n\ :root:not(.ads-loaded) .adg-rects {\n\ margin: 0;\n\ + font-size: 0;\n\ }\n\ div.center[style] {\n\ display: none !important;\n\ @@ -7334,6 +7338,31 @@ Filter = (function() { var ref; return (ref = post.file) != null ? ref.MD5 : void 0; }, + addFilter: function(type, re, cb) { + return $.get(type, Conf[type], function(item) { + var save; + save = item[type]; + save = save ? save + "\n" + re : re; + return $.set(type, save, cb); + }); + }, + quickFilterMD5: function() { + var origin, post; + post = Get.postFromNode(this); + if (!post.file) { + return; + } + Filter.addFilter('MD5', "/" + post.file.MD5 + "/"); + origin = post.origin || post; + if (origin.isReply) { + PostHiding.hide(origin); + } else if (g.VIEW === 'index') { + ThreadHiding.hide(origin.thread); + } + if (post.nodes.post.getBoundingClientRect().height) { + return new Notice('info', 'MD5 filtered.', 2); + } + }, menu: { init: function() { var div, entry, i, len, ref, ref1, type; @@ -7390,20 +7419,19 @@ Filter = (function() { } }); re = type === 'uniqueID' || type === 'MD5' ? "/" + re + "/" : "/^" + re + "$/"; - return $.get(type, Conf[type], function(item) { - var save, section, select, ta, tl; - save = item[type]; - save = save ? save + "\n" + re : re; - $.set(type, save); + return Filter.addFilter(type, re, function() { + var section, select; Settings.open('Filter'); section = $('.section-container'); select = $('select[name=filter]', section); select.value = type; Settings.selectFilter.call(select); - ta = $('textarea', section); - tl = ta.textLength; - ta.setSelectionRange(tl, tl); - return ta.focus(); + return $.onExists(section, 'textarea', function(ta) { + var tl; + tl = ta.textLength; + ta.setSelectionRange(tl, tl); + return ta.focus(); + }); }); } } @@ -8071,8 +8099,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; thread.isHidden = true; - if (Conf['JSON Index']) { - Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && !Index.showHiddenThreads) { + $.rm(thread.catalogView.nodes.root); } if (!makeStub) { return threadRoot.hidden = true; @@ -8087,8 +8116,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; threadRoot.hidden = thread.isHidden = false; - if (Conf['JSON Index']) { - return Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && Index.showHiddenThreads) { + return $.rm(thread.catalogView.nodes.root); } } }; @@ -9502,7 +9532,6 @@ Index = (function() { })(this)); }, toggleHide: function(thread) { - $.rm(thread.catalogView.nodes.root); if (Index.showHiddenThreads) { ThreadHiding.show(thread); if (!ThreadHiding.db.get({ @@ -9555,6 +9584,7 @@ Index = (function() { }, toggleHiddenThreads: function() { $('#hidden-toggle a', Index.navLinks).textContent = (Index.showHiddenThreads = !Index.showHiddenThreads) ? 'Hide' : 'Show'; + Index.sort(); return Index.buildIndex(); }, mode: function() { @@ -9607,7 +9637,7 @@ Index = (function() { }, hoverToggle: function(e) { var thread; - if (Conf['Catalog Hover Expand'] && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { + if (Conf['Catalog Hover Expand'] && $.hasClass(doc, 'catalog-mode') && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { $.toggleClass(doc, 'catalog-hover-expand'); if ((thread = Get.threadFromNode(e.target))) { Index.cb.catalogReplies.call(thread); @@ -9924,6 +9954,9 @@ Index = (function() { }, updateHideLabel: function() { var hiddenCount, k, len, ref, threadID; + if (!Index.hideLabel) { + return; + } hiddenCount = 0; ref = Index.liveThreadIDs; for (k = 0, len = ref.length; k < len; k++) { @@ -11156,6 +11189,9 @@ Settings = (function() { setD(key, false); } } + if (compareString < '00001.00013.00001.00002') { + addSauces(['#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights']); + } return changes; }, loadSettings: function(data, cb) { @@ -11201,11 +11237,11 @@ Settings = (function() { className: 'field', spellcheck: false }); - $.get(name, Conf[name], function(item) { - return ta.value = item[name]; - }); $.on(ta, 'change', $.cb.value); - $.add(div, ta); + $.get(name, Conf[name], function(item) { + ta.value = item[name]; + return $.add(div, ta); + }); return; } $.extend(div, { @@ -11216,19 +11252,20 @@ Settings = (function() { sauce: function(section) { var ta; $.extend(section, { - innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" + innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" }); $('.warning', section).hidden = Conf['Sauce']; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { - return ta.value = item['sauces']; + ta.value = item['sauces']; + return ta.hidden = false; }); return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { var applyCSS, boardSelect, customCSS, event, input, inputs, interval, items, itemsArchive, j, k, l, len, len1, len2, len3, m, name, ref, ref1, ref2, ref3, table, updateArchives, warning; $.extend(section, { - innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" + innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Quick filter MD5: %f
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" }); ref = $$('.warning', section); for (j = 0, len = ref.length; j < len; j++) { @@ -11264,6 +11301,7 @@ Settings = (function() { val = items[key]; input = inputs[key]; input[input.type === 'checkbox' ? 'checked' : 'value'] = val; + input.hidden = false; if (key in Settings) { Settings[key].call(input); } @@ -15797,7 +15835,7 @@ FileInfo = (function() { }); }, node: function() { - var a, i, info, len, oldInfo, ref; + var a, i, info, j, len, len1, oldInfo, ref, ref1; if (!this.file) { return; } @@ -15807,6 +15845,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.file-info .quick-filter-md5', this.file.text); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } return; } oldInfo = $.el('span', { @@ -15821,7 +15864,7 @@ FileInfo = (function() { return $.prepend(this.file.text, info); }, format: function(formatString, post, outputNode) { - var a, i, len, output, ref; + var a, i, j, len, len1, output, ref, ref1; output = []; formatString.replace(/%(.)|[^%]+/g, function(s, c) { output.push(c in FileInfo.formatters ? FileInfo.formatters[c].call(post) : { @@ -15837,6 +15880,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.quick-filter-md5', outputNode); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } }, formatters: { t: function() { @@ -15883,6 +15931,11 @@ FileInfo = (function() { innerHTML: "" }; }, + f: function() { + return { + innerHTML: "" + }; + }, p: function() { return { innerHTML: ((this.file.isSpoiler) ? "Spoiler, " : "") @@ -16242,7 +16295,7 @@ Keybinds = (function() { return Conf[hotkey] = key; }, keydown: function(e) { - var form, i, key, len, notification, notifications, op, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; + var form, i, key, len, notification, notifications, op, post, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; if (!(key = Keybinds.keyCode(e))) { return; } @@ -16564,6 +16617,14 @@ Keybinds = (function() { Header.scrollTo(threadRoot); ThreadHiding.toggle(thread); break; + case Conf['Quick Filter MD5']: + if (!threadRoot) { + return; + } + post = Keybinds.post(threadRoot); + Keybinds.hl(+1, threadRoot); + Filter.quickFilterMD5.call(post); + break; case Conf['Previous Post Quoting You']: if (!(threadRoot && QuoteYou.db)) { return; @@ -16637,10 +16698,13 @@ Keybinds = (function() { } return key; }, + post: function(thread) { + return $('.post.highlight', thread) || $('.op', thread); + }, qr: function(thread) { QR.open(); if (thread != null) { - QR.quote.call($('input', $('.post.highlight', thread) || thread)); + QR.quote.call(Keybinds.post(thread)); } return QR.nodes.com.focus(); }, @@ -16684,8 +16748,10 @@ Keybinds = (function() { if (all) { return ImageExpand.cb.toggleAll(); } else { - post = Get.postFromNode($('.post.highlight', thread) || $('.op', thread)); - return ImageExpand.toggle(post); + post = Get.postFromNode(Keybinds.post(thread)); + if (post.file) { + return ImageExpand.toggle(post); + } } }, open: function(thread, tab) { @@ -17443,7 +17509,6 @@ ReplyPruning = (function() { if (!(g.VIEW === 'thread' && Conf['Reply Pruning'])) { return; } - this.active = !(Conf['Quote Threading'] && Conf['Thread Quotes']); this.container = $.frag(); this.summary = $.el('span', { hidden: true, @@ -17456,7 +17521,7 @@ ReplyPruning = (function() { return $.event('change', null, _this.inputs.enabled); }; })(this)); - label = UI.checkbox('Prune Replies', 'Show Last', this.active); + label = UI.checkbox('Prune Replies', 'Show Last', Conf['Prune All Threads']); el = $.el('span', { title: 'Maximum number of replies to show.' }, { @@ -17467,6 +17532,7 @@ ReplyPruning = (function() { enabled: label.firstElementChild, replies: el.lastElementChild }; + this.setEnabled.call(this.inputs.enabled); $.on(this.inputs.enabled, 'change', this.setEnabled); $.on(this.inputs.replies, 'change', $.cb.value); Header.menu.addEntry({ @@ -17501,6 +17567,12 @@ ReplyPruning = (function() { node: function() { var ref; ReplyPruning.thread = this; + if (this.isSticky) { + ReplyPruning.active = ReplyPruning.inputs.enabled.checked = true; + if (QuoteThreading.input) { + Conf['Thread Quotes'] = QuoteThreading.input.checked = false; + } + } this.posts.forEach(function(post) { if (post.isReply) { ReplyPruning.total++; @@ -17509,7 +17581,7 @@ ReplyPruning = (function() { } } }); - if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (0 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { + if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (1 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { ReplyPruning.active = ReplyPruning.inputs.enabled.checked = false; } $.after(this.OP.nodes.root, ReplyPruning.summary); @@ -17534,7 +17606,7 @@ ReplyPruning = (function() { } }, update: function() { - var boardTop, frag, hidden1, hidden2, oldPos, post, posts; + var boardTop, frag, hidden1, hidden2, node, oldPos, post, posts; hidden1 = ReplyPruning.hidden; hidden2 = ReplyPruning.active ? Math.max(ReplyPruning.total - +Conf["Max Replies"], 0) : 0; oldPos = d.body.clientHeight - window.scrollY; @@ -17543,6 +17615,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden < hidden2 && ReplyPruning.position < posts.keys.length) { post = posts[posts.keys[ReplyPruning.position++]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.summary.nextSibling) && node !== post.nodes.root) { + $.add(ReplyPruning.container, node); + } $.add(ReplyPruning.container, post.nodes.root); ReplyPruning.hidden++; if (post.file) { @@ -17555,6 +17630,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden > hidden2 && ReplyPruning.position > 0) { post = posts[posts.keys[--ReplyPruning.position]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.container.lastChild) && node !== post.nodes.root) { + $.prepend(frag, node); + } $.prepend(frag, post.nodes.root); ReplyPruning.hidden--; if (post.file) { @@ -19034,11 +19112,10 @@ Unread = (function() { } }, scroll: function() { - var hash, position, ref, root; + var hash, position, root; if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } - ReplyPruning.showIfHidden((ref = Unread.position) != null ? ref.data.nodes.root.id : void 0); position = Unread.positionPrev(); while (position) { root = position.data.nodes.root; @@ -22896,10 +22973,13 @@ QuoteThreading = inserted: {}, setEnabled: function() { var other, ref; - other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; - if (this.checked && (other != null ? other.checked : void 0)) { - other.checked = false; - $.event('change', null, other); + if (this.checked) { + $.set('Prune All Threads', false); + other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; + if (other != null ? other.checked : void 0) { + other.checked = false; + $.event('change', null, other); + } } return $.cb.checked.call(this); }, diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 1bccf24e7..264225d03 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 a6b106ae2..57b6acdf3 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.1.1 +// @version 1.13.1.2 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -147,7 +147,7 @@ docSet = function() { }; g = { - VERSION: '1.13.1.1', + VERSION: '1.13.1.2', NAMESPACE: '4chan X.', boards: {} }; @@ -292,7 +292,8 @@ Config = (function() { 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], - 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] + 'Reply Pruning': [true, 'Add option in header menu to hide old replies in long threads. Activated by default in stickies.'], + 'Prune All Threads': [false, 'Activate Reply Pruning by default in all threads.', 1] }, 'Posting and Captchas': { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], @@ -374,7 +375,7 @@ Config = (function() { filesize: '', MD5: '' }, - sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", + sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", FappeT: { werk: false }, @@ -464,6 +465,7 @@ Config = (function() { 'Previous reply': ['k', 'Select previous reply.'], 'Deselect reply': ['Shift+d', 'Deselect reply.'], 'Hide': ['x', 'Hide thread.'], + 'Quick Filter MD5': ['5', 'Add the MD5 of the selected image to the filter list.'], 'Previous Post Quoting You': ['Alt+Up', 'Scroll to the previous post that quotes you.'], 'Next Post Quoting You': ['Alt+Down', 'Scroll to the next post that quotes you.'] }, @@ -1327,11 +1329,13 @@ body > div[style*=\" top: -10000px;\"] {\n\ }\n\ :root:not(.ads-loaded) .ad-plea,\n\ :root:not(.ads-loaded) hr.abovePostForm,\n\ -:root:not(.ads-loaded) .ad-plea-bottom + hr {\n\ +:root:not(.ads-loaded) .ad-plea-bottom + hr,\n\ +:root:not(.ads-loaded) #adg-ol + hr {\n\ display: none;\n\ }\n\ :root:not(.ads-loaded) .adg-rects {\n\ margin: 0;\n\ + font-size: 0;\n\ }\n\ div.center[style] {\n\ display: none !important;\n\ @@ -7334,6 +7338,31 @@ Filter = (function() { var ref; return (ref = post.file) != null ? ref.MD5 : void 0; }, + addFilter: function(type, re, cb) { + return $.get(type, Conf[type], function(item) { + var save; + save = item[type]; + save = save ? save + "\n" + re : re; + return $.set(type, save, cb); + }); + }, + quickFilterMD5: function() { + var origin, post; + post = Get.postFromNode(this); + if (!post.file) { + return; + } + Filter.addFilter('MD5', "/" + post.file.MD5 + "/"); + origin = post.origin || post; + if (origin.isReply) { + PostHiding.hide(origin); + } else if (g.VIEW === 'index') { + ThreadHiding.hide(origin.thread); + } + if (post.nodes.post.getBoundingClientRect().height) { + return new Notice('info', 'MD5 filtered.', 2); + } + }, menu: { init: function() { var div, entry, i, len, ref, ref1, type; @@ -7390,20 +7419,19 @@ Filter = (function() { } }); re = type === 'uniqueID' || type === 'MD5' ? "/" + re + "/" : "/^" + re + "$/"; - return $.get(type, Conf[type], function(item) { - var save, section, select, ta, tl; - save = item[type]; - save = save ? save + "\n" + re : re; - $.set(type, save); + return Filter.addFilter(type, re, function() { + var section, select; Settings.open('Filter'); section = $('.section-container'); select = $('select[name=filter]', section); select.value = type; Settings.selectFilter.call(select); - ta = $('textarea', section); - tl = ta.textLength; - ta.setSelectionRange(tl, tl); - return ta.focus(); + return $.onExists(section, 'textarea', function(ta) { + var tl; + tl = ta.textLength; + ta.setSelectionRange(tl, tl); + return ta.focus(); + }); }); } } @@ -8071,8 +8099,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; thread.isHidden = true; - if (Conf['JSON Index']) { - Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && !Index.showHiddenThreads) { + $.rm(thread.catalogView.nodes.root); } if (!makeStub) { return threadRoot.hidden = true; @@ -8087,8 +8116,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; threadRoot.hidden = thread.isHidden = false; - if (Conf['JSON Index']) { - return Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && Index.showHiddenThreads) { + return $.rm(thread.catalogView.nodes.root); } } }; @@ -9502,7 +9532,6 @@ Index = (function() { })(this)); }, toggleHide: function(thread) { - $.rm(thread.catalogView.nodes.root); if (Index.showHiddenThreads) { ThreadHiding.show(thread); if (!ThreadHiding.db.get({ @@ -9555,6 +9584,7 @@ Index = (function() { }, toggleHiddenThreads: function() { $('#hidden-toggle a', Index.navLinks).textContent = (Index.showHiddenThreads = !Index.showHiddenThreads) ? 'Hide' : 'Show'; + Index.sort(); return Index.buildIndex(); }, mode: function() { @@ -9607,7 +9637,7 @@ Index = (function() { }, hoverToggle: function(e) { var thread; - if (Conf['Catalog Hover Expand'] && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { + if (Conf['Catalog Hover Expand'] && $.hasClass(doc, 'catalog-mode') && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { $.toggleClass(doc, 'catalog-hover-expand'); if ((thread = Get.threadFromNode(e.target))) { Index.cb.catalogReplies.call(thread); @@ -9924,6 +9954,9 @@ Index = (function() { }, updateHideLabel: function() { var hiddenCount, k, len, ref, threadID; + if (!Index.hideLabel) { + return; + } hiddenCount = 0; ref = Index.liveThreadIDs; for (k = 0, len = ref.length; k < len; k++) { @@ -11156,6 +11189,9 @@ Settings = (function() { setD(key, false); } } + if (compareString < '00001.00013.00001.00002') { + addSauces(['#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights']); + } return changes; }, loadSettings: function(data, cb) { @@ -11201,11 +11237,11 @@ Settings = (function() { className: 'field', spellcheck: false }); - $.get(name, Conf[name], function(item) { - return ta.value = item[name]; - }); $.on(ta, 'change', $.cb.value); - $.add(div, ta); + $.get(name, Conf[name], function(item) { + ta.value = item[name]; + return $.add(div, ta); + }); return; } $.extend(div, { @@ -11216,19 +11252,20 @@ Settings = (function() { sauce: function(section) { var ta; $.extend(section, { - innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" + innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" }); $('.warning', section).hidden = Conf['Sauce']; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { - return ta.value = item['sauces']; + ta.value = item['sauces']; + return ta.hidden = false; }); return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { var applyCSS, boardSelect, customCSS, event, input, inputs, interval, items, itemsArchive, j, k, l, len, len1, len2, len3, m, name, ref, ref1, ref2, ref3, table, updateArchives, warning; $.extend(section, { - innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" + innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Quick filter MD5: %f
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" }); ref = $$('.warning', section); for (j = 0, len = ref.length; j < len; j++) { @@ -11264,6 +11301,7 @@ Settings = (function() { val = items[key]; input = inputs[key]; input[input.type === 'checkbox' ? 'checked' : 'value'] = val; + input.hidden = false; if (key in Settings) { Settings[key].call(input); } @@ -15797,7 +15835,7 @@ FileInfo = (function() { }); }, node: function() { - var a, i, info, len, oldInfo, ref; + var a, i, info, j, len, len1, oldInfo, ref, ref1; if (!this.file) { return; } @@ -15807,6 +15845,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.file-info .quick-filter-md5', this.file.text); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } return; } oldInfo = $.el('span', { @@ -15821,7 +15864,7 @@ FileInfo = (function() { return $.prepend(this.file.text, info); }, format: function(formatString, post, outputNode) { - var a, i, len, output, ref; + var a, i, j, len, len1, output, ref, ref1; output = []; formatString.replace(/%(.)|[^%]+/g, function(s, c) { output.push(c in FileInfo.formatters ? FileInfo.formatters[c].call(post) : { @@ -15837,6 +15880,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.quick-filter-md5', outputNode); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } }, formatters: { t: function() { @@ -15883,6 +15931,11 @@ FileInfo = (function() { innerHTML: "" }; }, + f: function() { + return { + innerHTML: "" + }; + }, p: function() { return { innerHTML: ((this.file.isSpoiler) ? "Spoiler, " : "") @@ -16242,7 +16295,7 @@ Keybinds = (function() { return Conf[hotkey] = key; }, keydown: function(e) { - var form, i, key, len, notification, notifications, op, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; + var form, i, key, len, notification, notifications, op, post, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; if (!(key = Keybinds.keyCode(e))) { return; } @@ -16564,6 +16617,14 @@ Keybinds = (function() { Header.scrollTo(threadRoot); ThreadHiding.toggle(thread); break; + case Conf['Quick Filter MD5']: + if (!threadRoot) { + return; + } + post = Keybinds.post(threadRoot); + Keybinds.hl(+1, threadRoot); + Filter.quickFilterMD5.call(post); + break; case Conf['Previous Post Quoting You']: if (!(threadRoot && QuoteYou.db)) { return; @@ -16637,10 +16698,13 @@ Keybinds = (function() { } return key; }, + post: function(thread) { + return $('.post.highlight', thread) || $('.op', thread); + }, qr: function(thread) { QR.open(); if (thread != null) { - QR.quote.call($('input', $('.post.highlight', thread) || thread)); + QR.quote.call(Keybinds.post(thread)); } return QR.nodes.com.focus(); }, @@ -16684,8 +16748,10 @@ Keybinds = (function() { if (all) { return ImageExpand.cb.toggleAll(); } else { - post = Get.postFromNode($('.post.highlight', thread) || $('.op', thread)); - return ImageExpand.toggle(post); + post = Get.postFromNode(Keybinds.post(thread)); + if (post.file) { + return ImageExpand.toggle(post); + } } }, open: function(thread, tab) { @@ -17443,7 +17509,6 @@ ReplyPruning = (function() { if (!(g.VIEW === 'thread' && Conf['Reply Pruning'])) { return; } - this.active = !(Conf['Quote Threading'] && Conf['Thread Quotes']); this.container = $.frag(); this.summary = $.el('span', { hidden: true, @@ -17456,7 +17521,7 @@ ReplyPruning = (function() { return $.event('change', null, _this.inputs.enabled); }; })(this)); - label = UI.checkbox('Prune Replies', 'Show Last', this.active); + label = UI.checkbox('Prune Replies', 'Show Last', Conf['Prune All Threads']); el = $.el('span', { title: 'Maximum number of replies to show.' }, { @@ -17467,6 +17532,7 @@ ReplyPruning = (function() { enabled: label.firstElementChild, replies: el.lastElementChild }; + this.setEnabled.call(this.inputs.enabled); $.on(this.inputs.enabled, 'change', this.setEnabled); $.on(this.inputs.replies, 'change', $.cb.value); Header.menu.addEntry({ @@ -17501,6 +17567,12 @@ ReplyPruning = (function() { node: function() { var ref; ReplyPruning.thread = this; + if (this.isSticky) { + ReplyPruning.active = ReplyPruning.inputs.enabled.checked = true; + if (QuoteThreading.input) { + Conf['Thread Quotes'] = QuoteThreading.input.checked = false; + } + } this.posts.forEach(function(post) { if (post.isReply) { ReplyPruning.total++; @@ -17509,7 +17581,7 @@ ReplyPruning = (function() { } } }); - if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (0 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { + if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (1 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { ReplyPruning.active = ReplyPruning.inputs.enabled.checked = false; } $.after(this.OP.nodes.root, ReplyPruning.summary); @@ -17534,7 +17606,7 @@ ReplyPruning = (function() { } }, update: function() { - var boardTop, frag, hidden1, hidden2, oldPos, post, posts; + var boardTop, frag, hidden1, hidden2, node, oldPos, post, posts; hidden1 = ReplyPruning.hidden; hidden2 = ReplyPruning.active ? Math.max(ReplyPruning.total - +Conf["Max Replies"], 0) : 0; oldPos = d.body.clientHeight - window.scrollY; @@ -17543,6 +17615,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden < hidden2 && ReplyPruning.position < posts.keys.length) { post = posts[posts.keys[ReplyPruning.position++]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.summary.nextSibling) && node !== post.nodes.root) { + $.add(ReplyPruning.container, node); + } $.add(ReplyPruning.container, post.nodes.root); ReplyPruning.hidden++; if (post.file) { @@ -17555,6 +17630,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden > hidden2 && ReplyPruning.position > 0) { post = posts[posts.keys[--ReplyPruning.position]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.container.lastChild) && node !== post.nodes.root) { + $.prepend(frag, node); + } $.prepend(frag, post.nodes.root); ReplyPruning.hidden--; if (post.file) { @@ -19034,11 +19112,10 @@ Unread = (function() { } }, scroll: function() { - var hash, position, ref, root; + var hash, position, root; if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } - ReplyPruning.showIfHidden((ref = Unread.position) != null ? ref.data.nodes.root.id : void 0); position = Unread.positionPrev(); while (position) { root = position.data.nodes.root; @@ -22896,10 +22973,13 @@ QuoteThreading = inserted: {}, setEnabled: function() { var other, ref; - other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; - if (this.checked && (other != null ? other.checked : void 0)) { - other.checked = false; - $.event('change', null, other); + if (this.checked) { + $.set('Prune All Threads', false); + other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; + if (other != null ? other.checked : void 0) { + other.checked = false; + $.event('change', null, other); + } } return $.cb.checked.call(this); }, diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index ecb97cb3b..3dcb54dab 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 51165b2ae..38b7f546a 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.1.1 +// @version 1.13.1.2 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 89d44c95f..6b65d94c6 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.1.1 +// @version 1.13.1.2 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -147,7 +147,7 @@ docSet = function() { }; g = { - VERSION: '1.13.1.1', + VERSION: '1.13.1.2', NAMESPACE: '4chan X.', boards: {} }; @@ -292,7 +292,8 @@ Config = (function() { 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], - 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] + 'Reply Pruning': [true, 'Add option in header menu to hide old replies in long threads. Activated by default in stickies.'], + 'Prune All Threads': [false, 'Activate Reply Pruning by default in all threads.', 1] }, 'Posting and Captchas': { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], @@ -374,7 +375,7 @@ Config = (function() { filesize: '', MD5: '' }, - sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", + sauces: "# Reverse image search:\nhttps://www.google.com/searchbyimage?image_url=%IMG&safe=off\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//tineye.com/search?url=%IMG\n#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights\n\n# Specialized reverse image search:\n//iqdb.org/?url=%IMG\nhttps://whatanime.ga/?auto&url=%IMG;text:wait\n#//3d.iqdb.org/?url=%IMG\n#//saucenao.com/search.php?url=%IMG\n\n# \"View Same\" in archives:\nhttp://eye.swfchan.com/search/?q=%name;types:swf\n#https://desuarchive.org/_/search/image/%sMD5/\n#https://archive.4plebs.org/_/search/image/%sMD5/\n#https://boards.fireden.net/_/search/image/%sMD5/\n#https://foolz.fireden.net/_/search/image/%sMD5/\n\n# Other tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n#//www.gif-explode.com/%URL;types:gif", FappeT: { werk: false }, @@ -464,6 +465,7 @@ Config = (function() { 'Previous reply': ['k', 'Select previous reply.'], 'Deselect reply': ['Shift+d', 'Deselect reply.'], 'Hide': ['x', 'Hide thread.'], + 'Quick Filter MD5': ['5', 'Add the MD5 of the selected image to the filter list.'], 'Previous Post Quoting You': ['Alt+Up', 'Scroll to the previous post that quotes you.'], 'Next Post Quoting You': ['Alt+Down', 'Scroll to the next post that quotes you.'] }, @@ -1327,11 +1329,13 @@ body > div[style*=\" top: -10000px;\"] {\n\ }\n\ :root:not(.ads-loaded) .ad-plea,\n\ :root:not(.ads-loaded) hr.abovePostForm,\n\ -:root:not(.ads-loaded) .ad-plea-bottom + hr {\n\ +:root:not(.ads-loaded) .ad-plea-bottom + hr,\n\ +:root:not(.ads-loaded) #adg-ol + hr {\n\ display: none;\n\ }\n\ :root:not(.ads-loaded) .adg-rects {\n\ margin: 0;\n\ + font-size: 0;\n\ }\n\ div.center[style] {\n\ display: none !important;\n\ @@ -7334,6 +7338,31 @@ Filter = (function() { var ref; return (ref = post.file) != null ? ref.MD5 : void 0; }, + addFilter: function(type, re, cb) { + return $.get(type, Conf[type], function(item) { + var save; + save = item[type]; + save = save ? save + "\n" + re : re; + return $.set(type, save, cb); + }); + }, + quickFilterMD5: function() { + var origin, post; + post = Get.postFromNode(this); + if (!post.file) { + return; + } + Filter.addFilter('MD5', "/" + post.file.MD5 + "/"); + origin = post.origin || post; + if (origin.isReply) { + PostHiding.hide(origin); + } else if (g.VIEW === 'index') { + ThreadHiding.hide(origin.thread); + } + if (post.nodes.post.getBoundingClientRect().height) { + return new Notice('info', 'MD5 filtered.', 2); + } + }, menu: { init: function() { var div, entry, i, len, ref, ref1, type; @@ -7390,20 +7419,19 @@ Filter = (function() { } }); re = type === 'uniqueID' || type === 'MD5' ? "/" + re + "/" : "/^" + re + "$/"; - return $.get(type, Conf[type], function(item) { - var save, section, select, ta, tl; - save = item[type]; - save = save ? save + "\n" + re : re; - $.set(type, save); + return Filter.addFilter(type, re, function() { + var section, select; Settings.open('Filter'); section = $('.section-container'); select = $('select[name=filter]', section); select.value = type; Settings.selectFilter.call(select); - ta = $('textarea', section); - tl = ta.textLength; - ta.setSelectionRange(tl, tl); - return ta.focus(); + return $.onExists(section, 'textarea', function(ta) { + var tl; + tl = ta.textLength; + ta.setSelectionRange(tl, tl); + return ta.focus(); + }); }); } } @@ -8071,8 +8099,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; thread.isHidden = true; - if (Conf['JSON Index']) { - Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && !Index.showHiddenThreads) { + $.rm(thread.catalogView.nodes.root); } if (!makeStub) { return threadRoot.hidden = true; @@ -8087,8 +8116,9 @@ ThreadHiding = (function() { } threadRoot = thread.nodes.root; threadRoot.hidden = thread.isHidden = false; - if (Conf['JSON Index']) { - return Index.updateHideLabel(); + Index.updateHideLabel(); + if (thread.catalogView && Index.showHiddenThreads) { + return $.rm(thread.catalogView.nodes.root); } } }; @@ -9502,7 +9532,6 @@ Index = (function() { })(this)); }, toggleHide: function(thread) { - $.rm(thread.catalogView.nodes.root); if (Index.showHiddenThreads) { ThreadHiding.show(thread); if (!ThreadHiding.db.get({ @@ -9555,6 +9584,7 @@ Index = (function() { }, toggleHiddenThreads: function() { $('#hidden-toggle a', Index.navLinks).textContent = (Index.showHiddenThreads = !Index.showHiddenThreads) ? 'Hide' : 'Show'; + Index.sort(); return Index.buildIndex(); }, mode: function() { @@ -9607,7 +9637,7 @@ Index = (function() { }, hoverToggle: function(e) { var thread; - if (Conf['Catalog Hover Expand'] && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { + if (Conf['Catalog Hover Expand'] && $.hasClass(doc, 'catalog-mode') && !$.modifiedClick(e) && !$.x('ancestor-or-self::a', e.target)) { $.toggleClass(doc, 'catalog-hover-expand'); if ((thread = Get.threadFromNode(e.target))) { Index.cb.catalogReplies.call(thread); @@ -9924,6 +9954,9 @@ Index = (function() { }, updateHideLabel: function() { var hiddenCount, k, len, ref, threadID; + if (!Index.hideLabel) { + return; + } hiddenCount = 0; ref = Index.liveThreadIDs; for (k = 0, len = ref.length; k < len; k++) { @@ -11156,6 +11189,9 @@ Settings = (function() { setD(key, false); } } + if (compareString < '00001.00013.00001.00002') { + addSauces(['#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights']); + } return changes; }, loadSettings: function(data, cb) { @@ -11201,11 +11237,11 @@ Settings = (function() { className: 'field', spellcheck: false }); - $.get(name, Conf[name], function(item) { - return ta.value = item[name]; - }); $.on(ta, 'change', $.cb.value); - $.add(div, ta); + $.get(name, Conf[name], function(item) { + ta.value = item[name]; + return $.add(div, ta); + }); return; } $.extend(div, { @@ -11216,19 +11252,20 @@ Settings = (function() { sauce: function(section) { var ta; $.extend(section, { - innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" + innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
You can specify the applicable boards by appending ;boards:[board1],[board2].
You can specify the applicable file types by appending ;types:[extension1],[extension2].
" }); $('.warning', section).hidden = Conf['Sauce']; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { - return ta.value = item['sauces']; + ta.value = item['sauces']; + return ta.hidden = false; }); return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { var applyCSS, boardSelect, customCSS, event, input, inputs, interval, items, itemsArchive, j, k, l, len, len1, len2, len3, m, name, ref, ref1, ref2, ref3, table, updateArchives, warning; $.extend(section, { - innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" + innerHTML: "
Archives
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection

Archive Lists: Each line below should be an archive list in this format or a URL to load an archive list from.
Archive properties can be overriden by another item with the same uid (or if absent, its name).
Last updated:
Captcha Language
Choose from list of language codes. Leave blank to autoselect.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:"Install Gentoo"
Index-only link: g-index
Catalog-only link: g-catalog
Index mode: g-mode:"infinite scrolling"
Index sort: g-sort:"creation date rev"
External link: external-text:"Google","http://www.google.com"
Combinations are possible: g-index-text:"Technology Index"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:"Piracy"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Literal %: %%
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
Download button: %d
Quick filter MD5: %f
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Tag: %g
Literal %: %%
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
Custom Cooldown Time
Seconds:
For more information about customizing 4chan X's CSS, see the styling guide.
Javascript Whitelist
Sources from which Javascript is allowed to be loaded by Content Security Policy.
Lines starting with a # will be ignored.
" }); ref = $$('.warning', section); for (j = 0, len = ref.length; j < len; j++) { @@ -11264,6 +11301,7 @@ Settings = (function() { val = items[key]; input = inputs[key]; input[input.type === 'checkbox' ? 'checked' : 'value'] = val; + input.hidden = false; if (key in Settings) { Settings[key].call(input); } @@ -15797,7 +15835,7 @@ FileInfo = (function() { }); }, node: function() { - var a, i, info, len, oldInfo, ref; + var a, i, info, j, len, len1, oldInfo, ref, ref1; if (!this.file) { return; } @@ -15807,6 +15845,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.file-info .quick-filter-md5', this.file.text); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } return; } oldInfo = $.el('span', { @@ -15821,7 +15864,7 @@ FileInfo = (function() { return $.prepend(this.file.text, info); }, format: function(formatString, post, outputNode) { - var a, i, len, output, ref; + var a, i, j, len, len1, output, ref, ref1; output = []; formatString.replace(/%(.)|[^%]+/g, function(s, c) { output.push(c in FileInfo.formatters ? FileInfo.formatters[c].call(post) : { @@ -15837,6 +15880,11 @@ FileInfo = (function() { a = ref[i]; $.on(a, 'click', ImageCommon.download); } + ref1 = $$('.quick-filter-md5', outputNode); + for (j = 0, len1 = ref1.length; j < len1; j++) { + a = ref1[j]; + $.on(a, 'click', Filter.quickFilterMD5); + } }, formatters: { t: function() { @@ -15883,6 +15931,11 @@ FileInfo = (function() { innerHTML: "" }; }, + f: function() { + return { + innerHTML: "" + }; + }, p: function() { return { innerHTML: ((this.file.isSpoiler) ? "Spoiler, " : "") @@ -16242,7 +16295,7 @@ Keybinds = (function() { return Conf[hotkey] = key; }, keydown: function(e) { - var form, i, key, len, notification, notifications, op, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; + var form, i, key, len, notification, notifications, op, post, ref, ref1, ref2, ref3, ref4, ref5, searchInput, target, thread, threadRoot; if (!(key = Keybinds.keyCode(e))) { return; } @@ -16564,6 +16617,14 @@ Keybinds = (function() { Header.scrollTo(threadRoot); ThreadHiding.toggle(thread); break; + case Conf['Quick Filter MD5']: + if (!threadRoot) { + return; + } + post = Keybinds.post(threadRoot); + Keybinds.hl(+1, threadRoot); + Filter.quickFilterMD5.call(post); + break; case Conf['Previous Post Quoting You']: if (!(threadRoot && QuoteYou.db)) { return; @@ -16637,10 +16698,13 @@ Keybinds = (function() { } return key; }, + post: function(thread) { + return $('.post.highlight', thread) || $('.op', thread); + }, qr: function(thread) { QR.open(); if (thread != null) { - QR.quote.call($('input', $('.post.highlight', thread) || thread)); + QR.quote.call(Keybinds.post(thread)); } return QR.nodes.com.focus(); }, @@ -16684,8 +16748,10 @@ Keybinds = (function() { if (all) { return ImageExpand.cb.toggleAll(); } else { - post = Get.postFromNode($('.post.highlight', thread) || $('.op', thread)); - return ImageExpand.toggle(post); + post = Get.postFromNode(Keybinds.post(thread)); + if (post.file) { + return ImageExpand.toggle(post); + } } }, open: function(thread, tab) { @@ -17443,7 +17509,6 @@ ReplyPruning = (function() { if (!(g.VIEW === 'thread' && Conf['Reply Pruning'])) { return; } - this.active = !(Conf['Quote Threading'] && Conf['Thread Quotes']); this.container = $.frag(); this.summary = $.el('span', { hidden: true, @@ -17456,7 +17521,7 @@ ReplyPruning = (function() { return $.event('change', null, _this.inputs.enabled); }; })(this)); - label = UI.checkbox('Prune Replies', 'Show Last', this.active); + label = UI.checkbox('Prune Replies', 'Show Last', Conf['Prune All Threads']); el = $.el('span', { title: 'Maximum number of replies to show.' }, { @@ -17467,6 +17532,7 @@ ReplyPruning = (function() { enabled: label.firstElementChild, replies: el.lastElementChild }; + this.setEnabled.call(this.inputs.enabled); $.on(this.inputs.enabled, 'change', this.setEnabled); $.on(this.inputs.replies, 'change', $.cb.value); Header.menu.addEntry({ @@ -17501,6 +17567,12 @@ ReplyPruning = (function() { node: function() { var ref; ReplyPruning.thread = this; + if (this.isSticky) { + ReplyPruning.active = ReplyPruning.inputs.enabled.checked = true; + if (QuoteThreading.input) { + Conf['Thread Quotes'] = QuoteThreading.input.checked = false; + } + } this.posts.forEach(function(post) { if (post.isReply) { ReplyPruning.total++; @@ -17509,7 +17581,7 @@ ReplyPruning = (function() { } } }); - if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (0 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { + if (ReplyPruning.active && /^#p\d+$/.test(location.hash) && (1 <= (ref = this.posts.keys.indexOf(location.hash.slice(2))) && ref < 1 + Math.max(ReplyPruning.total - +Conf["Max Replies"], 0))) { ReplyPruning.active = ReplyPruning.inputs.enabled.checked = false; } $.after(this.OP.nodes.root, ReplyPruning.summary); @@ -17534,7 +17606,7 @@ ReplyPruning = (function() { } }, update: function() { - var boardTop, frag, hidden1, hidden2, oldPos, post, posts; + var boardTop, frag, hidden1, hidden2, node, oldPos, post, posts; hidden1 = ReplyPruning.hidden; hidden2 = ReplyPruning.active ? Math.max(ReplyPruning.total - +Conf["Max Replies"], 0) : 0; oldPos = d.body.clientHeight - window.scrollY; @@ -17543,6 +17615,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden < hidden2 && ReplyPruning.position < posts.keys.length) { post = posts[posts.keys[ReplyPruning.position++]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.summary.nextSibling) && node !== post.nodes.root) { + $.add(ReplyPruning.container, node); + } $.add(ReplyPruning.container, post.nodes.root); ReplyPruning.hidden++; if (post.file) { @@ -17555,6 +17630,9 @@ ReplyPruning = (function() { while (ReplyPruning.hidden > hidden2 && ReplyPruning.position > 0) { post = posts[posts.keys[--ReplyPruning.position]]; if (post.isReply && !post.isFetchedQuote) { + while ((node = ReplyPruning.container.lastChild) && node !== post.nodes.root) { + $.prepend(frag, node); + } $.prepend(frag, post.nodes.root); ReplyPruning.hidden--; if (post.file) { @@ -19034,11 +19112,10 @@ Unread = (function() { } }, scroll: function() { - var hash, position, ref, root; + var hash, position, root; if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } - ReplyPruning.showIfHidden((ref = Unread.position) != null ? ref.data.nodes.root.id : void 0); position = Unread.positionPrev(); while (position) { root = position.data.nodes.root; @@ -22896,10 +22973,13 @@ QuoteThreading = inserted: {}, setEnabled: function() { var other, ref; - other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; - if (this.checked && (other != null ? other.checked : void 0)) { - other.checked = false; - $.event('change', null, other); + if (this.checked) { + $.set('Prune All Threads', false); + other = (ref = ReplyPruning.inputs) != null ? ref.enabled : void 0; + if (other != null ? other.checked : void 0) { + other.checked = false; + $.event('change', null, other); + } } return $.cb.checked.call(this); }, diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 808f7025e..80a77dd2b 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 0c0674179..04f96cd86 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 f05d352fa..7662bf5b7 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index e81c824e3..531201bce 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.13.1.1", - "date": "2016-11-07T11:05:03.448Z" + "version": "1.13.1.2", + "date": "2016-11-08T10:25:49.007Z" } \ No newline at end of file