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/
|
node_modules/
|
||||||
*~
|
*~
|
||||||
*.db
|
*.db
|
||||||
|
*.DS_Store
|
||||||
tmp-crx/
|
tmp-crx/
|
||||||
tmp-userscript/
|
tmp-userscript/
|
||||||
testbuilds/
|
testbuilds/
|
||||||
|
|||||||
@ -349,6 +349,10 @@ Config =
|
|||||||
false
|
false
|
||||||
'Automatically load the captcha when you open a thread, and reload it after you post.'
|
'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 Links':
|
||||||
'Quote Backlinks': [
|
'Quote Backlinks': [
|
||||||
|
|||||||
@ -836,6 +836,13 @@ span.hide-announcement {
|
|||||||
.qr-link-container {
|
.qr-link-container {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.qr-link-container-bottom {
|
||||||
|
width: 200px;
|
||||||
|
position: absolute;
|
||||||
|
left: -100px;
|
||||||
|
margin-left: 50%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.qr-link {
|
.qr-link {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 6px 10px 5px;
|
padding: 6px 10px 5px;
|
||||||
|
|||||||
@ -56,8 +56,23 @@ QR =
|
|||||||
if Conf['QR Shortcut']
|
if Conf['QR Shortcut']
|
||||||
$.rmClass $('.qr-shortcut'), 'disabled'
|
$.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
|
$.before $.id('togglePostFormLink'), link
|
||||||
|
|
||||||
|
|
||||||
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
||||||
cb QR.selected
|
cb QR.selected
|
||||||
$.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->
|
$.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user