Add optional bottom QR link
This commit is contained in:
parent
af887010a7
commit
a17df81fe9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
node_modules/
|
||||
*~
|
||||
*.db
|
||||
*.DS_Store
|
||||
tmp-crx/
|
||||
tmp-userscript/
|
||||
testbuilds/
|
||||
|
||||
@ -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': [
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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: "[<a href='javascript:;' class='qr-link-bottom'>Reply to Thread</a>]"
|
||||
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}) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user