diff --git a/.gitignore b/.gitignore index baf99ac49..33a9e31be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules/ *~ *.db +*.DS_Store tmp-crx/ tmp-userscript/ testbuilds/ diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 8ab468a0c..7be3a175c 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -349,6 +349,10 @@ Config = false 'Automatically load the captcha when you open a thread, and reload it after you post.' ] + 'Bottom QR Link': [ + true + 'Places a link on the bottom of threads to open the QR.' + ] 'Quote Links': 'Quote Backlinks': [ diff --git a/src/General/css/style.css b/src/General/css/style.css index a555bf1af..c88edb055 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -836,6 +836,13 @@ span.hide-announcement { .qr-link-container { text-align: center; } +.qr-link-container-bottom { + width: 200px; + position: absolute; + left: -100px; + margin-left: 50%; + text-align: center; +} .qr-link { border-radius: 3px; padding: 6px 10px 5px; diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index e636cec1c..116088e8e 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -56,8 +56,23 @@ QR = if Conf['QR Shortcut'] $.rmClass $('.qr-shortcut'), 'disabled' + if Conf['Bottom QR Link'] and g.VIEW is 'thread' + linkBot = $.el 'div', + innerHTML: "[Reply to Thread]" + className: "qr-link-container-bottom" + + $.on linkBot.firstElementChild, 'click', -> + $.event 'CloseMenu' + QR.open() + QR.nodes.com.focus() + if Conf['QR Shortcut'] + $.rmClass $('.qr-shortcut'), 'disabled' + + $.prepend $('.navLinksBot'), linkBot + $.before $.id('togglePostFormLink'), link + $.on d, 'QRGetSelectedPost', ({detail: cb}) -> cb QR.selected $.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->