Add options for header and page QR shortcuts. #280
This commit is contained in:
parent
c78443ac00
commit
94124f953b
@ -3,6 +3,8 @@ zixaphir
|
||||
- Fix stubs in reply hiding menu not following stubs config
|
||||
- Fix thread hiding
|
||||
- Fix Board Subtitle option
|
||||
- Revert to Mayhem-style notifications
|
||||
- Add options for adding QR Shortcuts to the header or page
|
||||
|
||||
### 2.0.1 - 2013-05-08
|
||||
seaweed
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -243,9 +243,13 @@ Config =
|
||||
]
|
||||
|
||||
'Posting':
|
||||
'Quick Reply': [
|
||||
'Header Shortcut': [
|
||||
true
|
||||
'All-in-one form to reply, create threads, automate dumping and more.'
|
||||
'Add a shortcut to the header to toggle the QR.'
|
||||
]
|
||||
'Page Shortcut': [
|
||||
false
|
||||
'Add a shortcut to the top of the page to toggle the QR.'
|
||||
]
|
||||
'Persistent QR': [
|
||||
true
|
||||
|
||||
@ -1120,6 +1120,10 @@ input:checked + .rice {
|
||||
#selectrice:empty {
|
||||
display: none;
|
||||
}
|
||||
/* Post Form Shortcut */
|
||||
.qr-shortcut.on-page {
|
||||
font-size: 250%;
|
||||
}
|
||||
/* Post Form */
|
||||
#qr {
|
||||
z-index: 20;
|
||||
@ -1346,16 +1350,6 @@ input:not([type=radio]) {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
#showQR {
|
||||
display: #{if _conf["Hide Show Post Form"] then "none" else "block"};
|
||||
z-index: 4;
|
||||
#{Style.sidebarLocation[0]}: 2px;
|
||||
width: #{width}px;
|
||||
background-color: transparent;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
top: auto;
|
||||
}
|
||||
/* Fake File Input */
|
||||
#qr-filename,
|
||||
.has-file #qr-no-file {
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
QR =
|
||||
init: ->
|
||||
return if !Conf['Quick Reply']
|
||||
|
||||
@db = new DataBoard 'yourPosts'
|
||||
|
||||
$.ready @initReady
|
||||
$.on d, '4chanXInitFinished', @persist if Conf['Persistent QR']
|
||||
|
||||
Post::callbacks.push
|
||||
name: 'Quick Reply'
|
||||
cb: @node
|
||||
|
||||
return unless Conf['Header Shortcut'] or Conf['Page Shortcut']
|
||||
|
||||
sc = $.el 'a',
|
||||
className: "qr-shortcut #{unless Conf['Persistent QR'] then 'disabled' else ''}"
|
||||
textContent: 'QR'
|
||||
@ -19,14 +26,16 @@ QR =
|
||||
QR.close()
|
||||
$.toggleClass @, 'disabled'
|
||||
|
||||
Header.addShortcut sc
|
||||
return Header.addShortcut sc if Conf['Header Shortcut']
|
||||
|
||||
$.ready @initReady
|
||||
$.on d, '4chanXInitFinished', @persist if Conf['Persistent QR']
|
||||
|
||||
Post::callbacks.push
|
||||
name: 'Quick Reply'
|
||||
cb: @node
|
||||
$.addClass sc, 'on-page'
|
||||
sc.textContent = if g.VIEW is 'thread' then 'Reply to Thread' else 'Start a Thread'
|
||||
con = $.el 'div',
|
||||
className: 'center'
|
||||
$.add con, sc
|
||||
$.asap (-> d.body), ->
|
||||
$.asap (-> $.id 'postForm'), ->
|
||||
$.before $.id('postForm'), con
|
||||
|
||||
initReady: ->
|
||||
QR.postingIsEnabled = !!$.id 'postForm'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user