diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 7525d156e..3a460f424 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -320,10 +320,7 @@ Indicators: { 'Emoji': ['enabled', 'Add icons besides usernames with triggered e-mails, like sega and neko.', ['enabled', 'disable ponies', 'only ponies', 'disable']], 'Emoji Position': ['before', 'Position of emoji icons.', ['before', 'after']], - 'Emoji Spacing': ['5', 'Add some spacing between emoji and text.', 'text'], - 'Sage Highlighting': ['image', 'Icons or text to highlight saged posts.', ['text', 'image', 'none']], - 'Sage Image': ['appchan', 'Image to use for sage highlighting.', ['4chan SS', 'appchan']], - 'Sage Highlight Position': ['after', 'Position of Sage Highlighting', ['before', 'after']] + 'Emoji Spacing': ['5', 'Add some spacing between emoji and text.', 'text'] } }, threadWatcher: { @@ -389,8 +386,9 @@ 'Code tags': ['Alt+c', 'Insert code tags.'], 'Eqn tags': ['Alt+e', 'Insert eqn tags.'], 'Math tags': ['Alt+m', 'Insert math tags.'], - 'Toggle sage': ['Alt+s', 'Toggle sage in email field'], + 'Toggle sage': ['Alt+s', 'Toggle sage in email field.'], 'Submit QR': ['Ctrl+Enter', 'Submit post.'], + 'Post Without Name': ['Alt+n', 'Clear name field and then submits post.'], 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread now.'], 'Expand image': ['Shift+e', 'Expand selected image.'], @@ -14987,6 +14985,12 @@ QR.submit(); } break; + case Conf['Post Without Name']: + if (QR.nodes && !QR.status()) { + Keybinds.name(); + QR.submit(); + } + break; case Conf['Update']: switch (g.VIEW) { case 'thread': @@ -15164,6 +15168,9 @@ ta.setSelectionRange(range, range); return $.event('input', null, ta); }, + name: function() { + return QR.nodes.name.value = ''; + }, sage: function() { var isSage; diff --git a/builds/crx/script.js b/builds/crx/script.js index 52417226d..f1ca74e64 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -299,10 +299,7 @@ Indicators: { 'Emoji': ['enabled', 'Add icons besides usernames with triggered e-mails, like sega and neko.', ['enabled', 'disable ponies', 'only ponies', 'disable']], 'Emoji Position': ['before', 'Position of emoji icons.', ['before', 'after']], - 'Emoji Spacing': ['5', 'Add some spacing between emoji and text.', 'text'], - 'Sage Highlighting': ['image', 'Icons or text to highlight saged posts.', ['text', 'image', 'none']], - 'Sage Image': ['appchan', 'Image to use for sage highlighting.', ['4chan SS', 'appchan']], - 'Sage Highlight Position': ['after', 'Position of Sage Highlighting', ['before', 'after']] + 'Emoji Spacing': ['5', 'Add some spacing between emoji and text.', 'text'] } }, threadWatcher: { @@ -368,8 +365,9 @@ 'Code tags': ['Alt+c', 'Insert code tags.'], 'Eqn tags': ['Alt+e', 'Insert eqn tags.'], 'Math tags': ['Alt+m', 'Insert math tags.'], - 'Toggle sage': ['Alt+s', 'Toggle sage in email field'], + 'Toggle sage': ['Alt+s', 'Toggle sage in email field.'], 'Submit QR': ['Ctrl+Enter', 'Submit post.'], + 'Post Without Name': ['Alt+n', 'Clear name field and then submits post.'], 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread now.'], 'Expand image': ['Shift+e', 'Expand selected image.'], @@ -14979,6 +14977,12 @@ QR.submit(); } break; + case Conf['Post Without Name']: + if (QR.nodes && !QR.status()) { + Keybinds.name(); + QR.submit(); + } + break; case Conf['Update']: switch (g.VIEW) { case 'thread': @@ -15156,6 +15160,9 @@ ta.setSelectionRange(range, range); return $.event('input', null, ta); }, + name: function() { + return QR.nodes.name.value = ''; + }, sage: function() { var isSage; diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 1813d9b77..e164a25c7 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -740,21 +740,6 @@ Config = 'Add some spacing between emoji and text.' 'text' ] - 'Sage Highlighting': [ - 'image' - 'Icons or text to highlight saged posts.' - ['text', 'image', 'none'] - ] - 'Sage Image': [ - 'appchan' - 'Image to use for sage highlighting.' - ['4chan SS', 'appchan'] - ] - 'Sage Highlight Position': [ - 'after' - 'Position of Sage Highlighting' - ['before', 'after'] - ] threadWatcher: 'Current Board': [ @@ -945,12 +930,16 @@ box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2); ] 'Toggle sage': [ 'Alt+s' - 'Toggle sage in email field' + 'Toggle sage in email field.' ] 'Submit QR': [ 'Ctrl+Enter' 'Submit post.' ] + 'Post Without Name': [ + 'Alt+n' + 'Clear name field and then submits post.' + ] # Thread related 'Watch': [ 'w' diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index bb3f5688c..959de80a1 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -64,6 +64,10 @@ Keybinds = Keybinds.sage() if QR.nodes when Conf['Submit QR'] QR.submit() if QR.nodes and !QR.status() + when Conf['Post Without Name'] + if QR.nodes and !QR.status() + Keybinds.name() + QR.submit() # Index/Thread related when Conf['Update'] switch g.VIEW @@ -191,6 +195,8 @@ Keybinds = # Fire the 'input' event $.event 'input', null, ta + name: -> QR.nodes.name.value = '' + sage: -> isSage = /sage/i.test QR.nodes.email.value QR.nodes.email.value = if isSage