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 stubs in reply hiding menu not following stubs config
|
||||||
- Fix thread hiding
|
- Fix thread hiding
|
||||||
- Fix Board Subtitle option
|
- 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
|
### 2.0.1 - 2013-05-08
|
||||||
seaweed
|
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':
|
'Posting':
|
||||||
'Quick Reply': [
|
'Header Shortcut': [
|
||||||
true
|
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': [
|
'Persistent QR': [
|
||||||
true
|
true
|
||||||
|
|||||||
@ -1120,6 +1120,10 @@ input:checked + .rice {
|
|||||||
#selectrice:empty {
|
#selectrice:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
/* Post Form Shortcut */
|
||||||
|
.qr-shortcut.on-page {
|
||||||
|
font-size: 250%;
|
||||||
|
}
|
||||||
/* Post Form */
|
/* Post Form */
|
||||||
#qr {
|
#qr {
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
@ -1346,16 +1350,6 @@ input:not([type=radio]) {
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
z-index: -1;
|
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 */
|
/* Fake File Input */
|
||||||
#qr-filename,
|
#qr-filename,
|
||||||
.has-file #qr-no-file {
|
.has-file #qr-no-file {
|
||||||
|
|||||||
@ -1,9 +1,16 @@
|
|||||||
QR =
|
QR =
|
||||||
init: ->
|
init: ->
|
||||||
return if !Conf['Quick Reply']
|
|
||||||
|
|
||||||
@db = new DataBoard 'yourPosts'
|
@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',
|
sc = $.el 'a',
|
||||||
className: "qr-shortcut #{unless Conf['Persistent QR'] then 'disabled' else ''}"
|
className: "qr-shortcut #{unless Conf['Persistent QR'] then 'disabled' else ''}"
|
||||||
textContent: 'QR'
|
textContent: 'QR'
|
||||||
@ -19,14 +26,16 @@ QR =
|
|||||||
QR.close()
|
QR.close()
|
||||||
$.toggleClass @, 'disabled'
|
$.toggleClass @, 'disabled'
|
||||||
|
|
||||||
Header.addShortcut sc
|
return Header.addShortcut sc if Conf['Header Shortcut']
|
||||||
|
|
||||||
$.ready @initReady
|
$.addClass sc, 'on-page'
|
||||||
$.on d, '4chanXInitFinished', @persist if Conf['Persistent QR']
|
sc.textContent = if g.VIEW is 'thread' then 'Reply to Thread' else 'Start a Thread'
|
||||||
|
con = $.el 'div',
|
||||||
Post::callbacks.push
|
className: 'center'
|
||||||
name: 'Quick Reply'
|
$.add con, sc
|
||||||
cb: @node
|
$.asap (-> d.body), ->
|
||||||
|
$.asap (-> $.id 'postForm'), ->
|
||||||
|
$.before $.id('postForm'), con
|
||||||
|
|
||||||
initReady: ->
|
initReady: ->
|
||||||
QR.postingIsEnabled = !!$.id 'postForm'
|
QR.postingIsEnabled = !!$.id 'postForm'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user