diff --git a/CHANGELOG.md b/CHANGELOG.md index d7449062a..10322d070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ ## v1.13.0 +**v1.13.0.8** *(2016-10-08)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.8/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.8/builds/4chan-X-noupdate.crx)] +- (AchtBit) Add keybind for toggling custom cooldown (default: `Alt+Comma`). +- Add keybind to post file from URL (default: `Alt+l`). +- Add keybind for adding new post to QR dump list (default: `Alt+n`). + **v1.13.0.7** *(2016-10-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.7/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.7/builds/4chan-X-noupdate.crx)] - Fix filenames not being properly unescaped in catalog replies. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index b160a6626..b04d4f195 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 82f02d6c4..edd0618e3 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.0.7 +// @version 1.13.0.8 // @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 6da9f9ab6..411aa3ad3 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.0.7 +// @version 1.13.0.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.7', + VERSION: '1.13.0.8', NAMESPACE: '4chan X.', boards: {} }; @@ -418,6 +418,9 @@ Config = (function() { 'Math tags': ['Alt+m', 'Insert math tags.'], 'SJIS tags': ['Alt+a', 'Insert SJIS tags.'], 'Toggle sage': ['Alt+s', 'Toggle sage in options field.'], + 'Toggle Cooldown': ['Alt+Comma', 'Toggle custom cooldown timer.'], + 'Post from URL': ['Alt+l', 'Post from URL.'], + 'Add new post': ['Alt+n', 'Add new post to the QR dump list.'], 'Submit QR': ['Ctrl+Enter', 'Submit post.'], 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], @@ -16019,6 +16022,24 @@ Keybinds = (function() { } Keybinds.sage(); break; + case Conf['Toggle Cooldown']: + if (!(QR.nodes && !QR.nodes.el.hidden && $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown'))) { + return; + } + QR.toggleCustomCooldown(); + break; + case Conf['Post from URL']: + if (!QR.postingIsEnabled) { + return; + } + QR.handleUrl(''); + break; + case Conf['Add new post']: + if (!QR.postingIsEnabled) { + return; + } + QR.addPost(); + break; case Conf['Submit QR']: if (!(QR.nodes && !QR.nodes.el.hidden)) { return; @@ -20220,6 +20241,16 @@ QR = (function() { texPreviewHide: function() { return $.rmClass(QR.nodes.el, 'tex-preview'); }, + addPost: function() { + var wasOpen; + wasOpen = QR.nodes && !QR.nodes.el.hidden; + QR.open(); + if (wasOpen) { + $.addClass(QR.nodes.el, 'dump'); + new QR.post(true); + } + return QR.nodes.com.focus(); + }, setCustomCooldown: function(enabled) { Conf['customCooldownEnabled'] = enabled; QR.cooldown.customCooldown = enabled; @@ -20227,7 +20258,7 @@ QR = (function() { }, toggleCustomCooldown: function() { var enabled; - enabled = $.hasClass(this, 'disabled'); + enabled = $.hasClass(QR.nodes.customCooldown, 'disabled'); QR.setCustomCooldown(enabled); return $.set('customCooldownEnabled', enabled); }, @@ -20477,6 +20508,7 @@ QR = (function() { }, handleUrl: function(urlDefault) { var url; + QR.open(); url = prompt('Enter a URL:', urlDefault); if (url === null) { return; @@ -20560,7 +20592,7 @@ QR = (function() { var classList, config, dialog, event, i, items, name, node, nodes, save, setNode; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { - innerHTML: "
" + innerHTML: " " }) }; setNode = function(name, query) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 0a12c905f..468ac3483 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 08fe85706..0aebea983 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.0.7 +// @version 1.13.0.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.7', + VERSION: '1.13.0.8', NAMESPACE: '4chan X.', boards: {} }; @@ -418,6 +418,9 @@ Config = (function() { 'Math tags': ['Alt+m', 'Insert math tags.'], 'SJIS tags': ['Alt+a', 'Insert SJIS tags.'], 'Toggle sage': ['Alt+s', 'Toggle sage in options field.'], + 'Toggle Cooldown': ['Alt+Comma', 'Toggle custom cooldown timer.'], + 'Post from URL': ['Alt+l', 'Post from URL.'], + 'Add new post': ['Alt+n', 'Add new post to the QR dump list.'], 'Submit QR': ['Ctrl+Enter', 'Submit post.'], 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], @@ -16019,6 +16022,24 @@ Keybinds = (function() { } Keybinds.sage(); break; + case Conf['Toggle Cooldown']: + if (!(QR.nodes && !QR.nodes.el.hidden && $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown'))) { + return; + } + QR.toggleCustomCooldown(); + break; + case Conf['Post from URL']: + if (!QR.postingIsEnabled) { + return; + } + QR.handleUrl(''); + break; + case Conf['Add new post']: + if (!QR.postingIsEnabled) { + return; + } + QR.addPost(); + break; case Conf['Submit QR']: if (!(QR.nodes && !QR.nodes.el.hidden)) { return; @@ -20220,6 +20241,16 @@ QR = (function() { texPreviewHide: function() { return $.rmClass(QR.nodes.el, 'tex-preview'); }, + addPost: function() { + var wasOpen; + wasOpen = QR.nodes && !QR.nodes.el.hidden; + QR.open(); + if (wasOpen) { + $.addClass(QR.nodes.el, 'dump'); + new QR.post(true); + } + return QR.nodes.com.focus(); + }, setCustomCooldown: function(enabled) { Conf['customCooldownEnabled'] = enabled; QR.cooldown.customCooldown = enabled; @@ -20227,7 +20258,7 @@ QR = (function() { }, toggleCustomCooldown: function() { var enabled; - enabled = $.hasClass(this, 'disabled'); + enabled = $.hasClass(QR.nodes.customCooldown, 'disabled'); QR.setCustomCooldown(enabled); return $.set('customCooldownEnabled', enabled); }, @@ -20477,6 +20508,7 @@ QR = (function() { }, handleUrl: function(urlDefault) { var url; + QR.open(); url = prompt('Enter a URL:', urlDefault); if (url === null) { return; @@ -20560,7 +20592,7 @@ QR = (function() { var classList, config, dialog, event, i, items, name, node, nodes, save, setNode; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { - innerHTML: " " + innerHTML: " " }) }; setNode = function(name, query) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 13eb9c1d2..540cf3925 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 b4fafff1a..536df84d9 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.0.7 +// @version 1.13.0.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index a2c264291..5cccd7cc4 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.0.7 +// @version 1.13.0.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.7', + VERSION: '1.13.0.8', NAMESPACE: '4chan X.', boards: {} }; @@ -418,6 +418,9 @@ Config = (function() { 'Math tags': ['Alt+m', 'Insert math tags.'], 'SJIS tags': ['Alt+a', 'Insert SJIS tags.'], 'Toggle sage': ['Alt+s', 'Toggle sage in options field.'], + 'Toggle Cooldown': ['Alt+Comma', 'Toggle custom cooldown timer.'], + 'Post from URL': ['Alt+l', 'Post from URL.'], + 'Add new post': ['Alt+n', 'Add new post to the QR dump list.'], 'Submit QR': ['Ctrl+Enter', 'Submit post.'], 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], @@ -16019,6 +16022,24 @@ Keybinds = (function() { } Keybinds.sage(); break; + case Conf['Toggle Cooldown']: + if (!(QR.nodes && !QR.nodes.el.hidden && $.hasClass(QR.nodes.fileSubmit, 'custom-cooldown'))) { + return; + } + QR.toggleCustomCooldown(); + break; + case Conf['Post from URL']: + if (!QR.postingIsEnabled) { + return; + } + QR.handleUrl(''); + break; + case Conf['Add new post']: + if (!QR.postingIsEnabled) { + return; + } + QR.addPost(); + break; case Conf['Submit QR']: if (!(QR.nodes && !QR.nodes.el.hidden)) { return; @@ -20220,6 +20241,16 @@ QR = (function() { texPreviewHide: function() { return $.rmClass(QR.nodes.el, 'tex-preview'); }, + addPost: function() { + var wasOpen; + wasOpen = QR.nodes && !QR.nodes.el.hidden; + QR.open(); + if (wasOpen) { + $.addClass(QR.nodes.el, 'dump'); + new QR.post(true); + } + return QR.nodes.com.focus(); + }, setCustomCooldown: function(enabled) { Conf['customCooldownEnabled'] = enabled; QR.cooldown.customCooldown = enabled; @@ -20227,7 +20258,7 @@ QR = (function() { }, toggleCustomCooldown: function() { var enabled; - enabled = $.hasClass(this, 'disabled'); + enabled = $.hasClass(QR.nodes.customCooldown, 'disabled'); QR.setCustomCooldown(enabled); return $.set('customCooldownEnabled', enabled); }, @@ -20477,6 +20508,7 @@ QR = (function() { }, handleUrl: function(urlDefault) { var url; + QR.open(); url = prompt('Enter a URL:', urlDefault); if (url === null) { return; @@ -20560,7 +20592,7 @@ QR = (function() { var classList, config, dialog, event, i, items, name, node, nodes, save, setNode; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { - innerHTML: " " + innerHTML: " " }) }; setNode = function(name, query) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 939c54262..f5b5152ad 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 bf788f26e..7482dc03b 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@