diff --git a/CHANGELOG.md b/CHANGELOG.md index 8723af655..ecf641ced 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.18 +**v1.11.18.1** *(2015-11-22)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.18.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.18.1/builds/4chan-X-noupdate.crx "Chromium version")] +- Shorten the text of some menu items and show the Alt/Shift+click shortcuts to watch/hide threads in the catalog thread menu. +- Minor bugfixes. + **v1.11.18.0** *(2015-11-21)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.18.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.18.0/builds/4chan-X-noupdate.crx "Chromium version")] - Based on v1.11.17.8. - The `Force Noscript Captcha` option now works on the original post form, report form, /banned, and /feedback. For consistency, `Force Noscript Captcha` now overrides `Use Recaptcha v1`. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 4f93d61de..c62876efc 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 124b37442..730af725d 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.18.0 +// @version 1.11.18.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 c29ff70c7..4aee115b5 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.18.0 +// @version 1.11.18.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -432,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.18.0', + VERSION: '1.11.18.1', NAMESPACE: '4chan X.', boards: {} }; @@ -688,15 +688,16 @@ $.addStyle = function(css, id, test) { var style; + if (test == null) { + test = 'head'; + } style = $.el('style', { textContent: css }); if (id != null) { style.id = id; } - $.asap((function() { - return d.head && ((test == null) || test()); - }), function() { + $.onExists(doc, test, true, function() { return $.add(d.head, style); }); return style; @@ -787,12 +788,15 @@ return root.parentNode.replaceChild($.nodes(el), root); }; - $.el = function(tag, properties) { + $.el = function(tag, properties, properties2) { var el; el = d.createElement(tag); if (properties) { $.extend(el, properties); } + if (properties2) { + $.extend(el, properties2); + } return el; }; @@ -3422,7 +3426,10 @@ } return Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Shift+click" }), order: 20, open: function(arg) { @@ -3431,7 +3438,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = thread.isHidden ? 'Unhide thread' : 'Hide thread'; + this.el.firstElementChild.textContent = thread.isHidden ? 'Unhide' : 'Hide'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -4453,7 +4460,7 @@ className: 'catalog-thread' }); $.extend(root, { - innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" + innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" }); root.dataset.fullID = thread.fullID; if (thread.OP.highlights) { @@ -5535,7 +5542,7 @@ } div = $.el('div', { className: 'hide-reply-link', - textContent: 'Hide reply' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5569,7 +5576,7 @@ }); div = $.el('div', { className: 'show-reply-link', - textContent: 'Show reply' + textContent: 'Show' }); apply = $.el('a', { textContent: 'Apply', @@ -5953,7 +5960,7 @@ } div = $.el('div', { className: 'hide-thread-link', - textContent: 'Hide thread' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5983,7 +5990,7 @@ }); div = $.el('a', { className: 'show-thread-link', - textContent: 'Show thread', + textContent: 'Show', href: 'javascript:;' }); $.on(div, 'click', ThreadHiding.menu.show); @@ -12836,7 +12843,7 @@ order: 10, open: function(post) { if (!(post.isDead || (post.thread.isDead && !post.thread.isArchived))) { - a.textContent = 'Report this post'; + a.textContent = 'Report'; ReportLink.url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; ReportLink.height = 180; } else if (Conf['Archive Report']) { @@ -13576,7 +13583,10 @@ if (g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Alt+click" }), order: 6, open: function(arg) { @@ -13585,7 +13595,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch thread' : 'Watch thread'; + this.el.firstElementChild.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch' : 'Watch'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -15133,9 +15143,7 @@ return this.addStyle(); }, addStyle: function() { - return this.style = $.addStyle(Conf['usercss'], 'custom-css', function() { - return $.id('fourchanx-css'); - }); + return this.style = $.addStyle(Conf['usercss'], 'custom-css', '#fourchanx-css'); }, rmStyle: function() { if (this.style) { @@ -19394,6 +19402,11 @@ ":root.float #updater {\n" + " padding: 0px 3px;\n" + "}\n" + +":root:not(.float) #updater {\n" + +" display: inline-block;\n" + +" min-width: 12pt;\n" + +" text-align: right;\n" + +"}\n" + ".new {\n" + " color: limegreen;\n" + "}\n" + @@ -20261,6 +20274,16 @@ " position: relative;\n" + " top: 2px;\n" + "}\n" + +".entry.has-shortcut-text {\n" + +" display: flex;\n" + +" justify-content: space-between;\n" + +" align-items: center;\n" + +"}\n" + +".entry .shortcut-text {\n" + +" opacity: 0.5;\n" + +" font-size: 70%;\n" + +" margin-left: 5px;\n" + +"}\n" + ".has-submenu::after {\n" + " content: \"\";\n" + " border-left: .5em solid;\n" + diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 1c1179936..be44e795f 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 c0474f240..0d9740927 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.18.0 +// @version 1.11.18.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -432,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.18.0', + VERSION: '1.11.18.1', NAMESPACE: '4chan X.', boards: {} }; @@ -688,15 +688,16 @@ $.addStyle = function(css, id, test) { var style; + if (test == null) { + test = 'head'; + } style = $.el('style', { textContent: css }); if (id != null) { style.id = id; } - $.asap((function() { - return d.head && ((test == null) || test()); - }), function() { + $.onExists(doc, test, true, function() { return $.add(d.head, style); }); return style; @@ -787,12 +788,15 @@ return root.parentNode.replaceChild($.nodes(el), root); }; - $.el = function(tag, properties) { + $.el = function(tag, properties, properties2) { var el; el = d.createElement(tag); if (properties) { $.extend(el, properties); } + if (properties2) { + $.extend(el, properties2); + } return el; }; @@ -3422,7 +3426,10 @@ } return Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Shift+click" }), order: 20, open: function(arg) { @@ -3431,7 +3438,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = thread.isHidden ? 'Unhide thread' : 'Hide thread'; + this.el.firstElementChild.textContent = thread.isHidden ? 'Unhide' : 'Hide'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -4453,7 +4460,7 @@ className: 'catalog-thread' }); $.extend(root, { - innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" + innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" }); root.dataset.fullID = thread.fullID; if (thread.OP.highlights) { @@ -5535,7 +5542,7 @@ } div = $.el('div', { className: 'hide-reply-link', - textContent: 'Hide reply' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5569,7 +5576,7 @@ }); div = $.el('div', { className: 'show-reply-link', - textContent: 'Show reply' + textContent: 'Show' }); apply = $.el('a', { textContent: 'Apply', @@ -5953,7 +5960,7 @@ } div = $.el('div', { className: 'hide-thread-link', - textContent: 'Hide thread' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5983,7 +5990,7 @@ }); div = $.el('a', { className: 'show-thread-link', - textContent: 'Show thread', + textContent: 'Show', href: 'javascript:;' }); $.on(div, 'click', ThreadHiding.menu.show); @@ -12836,7 +12843,7 @@ order: 10, open: function(post) { if (!(post.isDead || (post.thread.isDead && !post.thread.isArchived))) { - a.textContent = 'Report this post'; + a.textContent = 'Report'; ReportLink.url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; ReportLink.height = 180; } else if (Conf['Archive Report']) { @@ -13576,7 +13583,10 @@ if (g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Alt+click" }), order: 6, open: function(arg) { @@ -13585,7 +13595,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch thread' : 'Watch thread'; + this.el.firstElementChild.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch' : 'Watch'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -15133,9 +15143,7 @@ return this.addStyle(); }, addStyle: function() { - return this.style = $.addStyle(Conf['usercss'], 'custom-css', function() { - return $.id('fourchanx-css'); - }); + return this.style = $.addStyle(Conf['usercss'], 'custom-css', '#fourchanx-css'); }, rmStyle: function() { if (this.style) { @@ -19394,6 +19402,11 @@ ":root.float #updater {\n" + " padding: 0px 3px;\n" + "}\n" + +":root:not(.float) #updater {\n" + +" display: inline-block;\n" + +" min-width: 12pt;\n" + +" text-align: right;\n" + +"}\n" + ".new {\n" + " color: limegreen;\n" + "}\n" + @@ -20261,6 +20274,16 @@ " position: relative;\n" + " top: 2px;\n" + "}\n" + +".entry.has-shortcut-text {\n" + +" display: flex;\n" + +" justify-content: space-between;\n" + +" align-items: center;\n" + +"}\n" + +".entry .shortcut-text {\n" + +" opacity: 0.5;\n" + +" font-size: 70%;\n" + +" margin-left: 5px;\n" + +"}\n" + ".has-submenu::after {\n" + " content: \"\";\n" + " border-left: .5em solid;\n" + diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 156539b1b..d218708d2 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 05a8856f0..209e9ab37 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.18.0 +// @version 1.11.18.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9a7fb2c0c..b828a98a6 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.18.0 +// @version 1.11.18.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -432,7 +432,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.18.0', + VERSION: '1.11.18.1', NAMESPACE: '4chan X.', boards: {} }; @@ -688,15 +688,16 @@ $.addStyle = function(css, id, test) { var style; + if (test == null) { + test = 'head'; + } style = $.el('style', { textContent: css }); if (id != null) { style.id = id; } - $.asap((function() { - return d.head && ((test == null) || test()); - }), function() { + $.onExists(doc, test, true, function() { return $.add(d.head, style); }); return style; @@ -787,12 +788,15 @@ return root.parentNode.replaceChild($.nodes(el), root); }; - $.el = function(tag, properties) { + $.el = function(tag, properties, properties2) { var el; el = d.createElement(tag); if (properties) { $.extend(el, properties); } + if (properties2) { + $.extend(el, properties2); + } return el; }; @@ -3422,7 +3426,10 @@ } return Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Shift+click" }), order: 20, open: function(arg) { @@ -3431,7 +3438,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = thread.isHidden ? 'Unhide thread' : 'Hide thread'; + this.el.firstElementChild.textContent = thread.isHidden ? 'Unhide' : 'Hide'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -4453,7 +4460,7 @@ className: 'catalog-thread' }); $.extend(root, { - innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" + innerHTML: "
" + E(postCount) + " / " + E(fileCount) + " / " + E(pageCount) + "
" + (thread.OP.info.subject ? "
" + E(thread.OP.info.subject) + "
" : "") + "
" + comment.innerHTML + "
" }); root.dataset.fullID = thread.fullID; if (thread.OP.highlights) { @@ -5535,7 +5542,7 @@ } div = $.el('div', { className: 'hide-reply-link', - textContent: 'Hide reply' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5569,7 +5576,7 @@ }); div = $.el('div', { className: 'show-reply-link', - textContent: 'Show reply' + textContent: 'Show' }); apply = $.el('a', { textContent: 'Apply', @@ -5953,7 +5960,7 @@ } div = $.el('div', { className: 'hide-thread-link', - textContent: 'Hide thread' + textContent: 'Hide' }); apply = $.el('a', { textContent: 'Apply', @@ -5983,7 +5990,7 @@ }); div = $.el('a', { className: 'show-thread-link', - textContent: 'Show thread', + textContent: 'Show', href: 'javascript:;' }); $.on(div, 'click', ThreadHiding.menu.show); @@ -12836,7 +12843,7 @@ order: 10, open: function(post) { if (!(post.isDead || (post.thread.isDead && !post.thread.isArchived))) { - a.textContent = 'Report this post'; + a.textContent = 'Report'; ReportLink.url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; ReportLink.height = 180; } else if (Conf['Archive Report']) { @@ -13576,7 +13583,10 @@ if (g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ el: $.el('a', { - href: 'javascript:;' + href: 'javascript:;', + className: 'has-shortcut-text' + }, { + innerHTML: "Alt+click" }), order: 6, open: function(arg) { @@ -13585,7 +13595,7 @@ if (Conf['Index Mode'] !== 'catalog') { return false; } - this.el.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch thread' : 'Watch thread'; + this.el.firstElementChild.textContent = ThreadWatcher.isWatched(thread) ? 'Unwatch' : 'Watch'; if (this.cb) { $.off(this.el, 'click', this.cb); } @@ -15133,9 +15143,7 @@ return this.addStyle(); }, addStyle: function() { - return this.style = $.addStyle(Conf['usercss'], 'custom-css', function() { - return $.id('fourchanx-css'); - }); + return this.style = $.addStyle(Conf['usercss'], 'custom-css', '#fourchanx-css'); }, rmStyle: function() { if (this.style) { @@ -19394,6 +19402,11 @@ ":root.float #updater {\n" + " padding: 0px 3px;\n" + "}\n" + +":root:not(.float) #updater {\n" + +" display: inline-block;\n" + +" min-width: 12pt;\n" + +" text-align: right;\n" + +"}\n" + ".new {\n" + " color: limegreen;\n" + "}\n" + @@ -20261,6 +20274,16 @@ " position: relative;\n" + " top: 2px;\n" + "}\n" + +".entry.has-shortcut-text {\n" + +" display: flex;\n" + +" justify-content: space-between;\n" + +" align-items: center;\n" + +"}\n" + +".entry .shortcut-text {\n" + +" opacity: 0.5;\n" + +" font-size: 70%;\n" + +" margin-left: 5px;\n" + +"}\n" + ".has-submenu::after {\n" + " content: \"\";\n" + " border-left: .5em solid;\n" + diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 54c1d438e..c0da3a80d 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 b36cbd4ce..61f8f8a1e 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 4291a3927..a2498dfe2 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index ea51306d4..1462e9819 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.18.0", - "date": "2015-11-21T09:40:59.277Z" + "version": "1.11.18.1", + "date": "2015-11-23T02:19:39.661Z" }