Getting somewhere...
This commit is contained in:
parent
46dcaf6467
commit
8b3dbc82fd
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,10 +9,6 @@ Config =
|
||||
false
|
||||
'Link to external catalog instead of the internal one.'
|
||||
]
|
||||
'QR Shortcut': [
|
||||
false,
|
||||
'Adds a small [QR] link in the header.'
|
||||
]
|
||||
'Announcement Hiding': [
|
||||
true
|
||||
'Add button to hide 4chan announcements.'
|
||||
@ -273,10 +269,6 @@ Config =
|
||||
false
|
||||
'Remember the size of the quick reply\'s comment field.'
|
||||
]
|
||||
'Hide Original Post Form': [
|
||||
true
|
||||
'Hide the normal post form.'
|
||||
]
|
||||
'Cooldown': [
|
||||
true
|
||||
'Indicate the remaining time before posting again.'
|
||||
@ -667,10 +659,6 @@ Config =
|
||||
true
|
||||
'Use compact inputs on the post form.'
|
||||
]
|
||||
'Hide Show Post Form': [
|
||||
false
|
||||
'Hides the "Show Post Form" button when Persistent QR is disabled.'
|
||||
]
|
||||
'Show Post Form Header': [
|
||||
false
|
||||
'Force the Post Form to have a header.'
|
||||
|
||||
@ -1095,7 +1095,7 @@ input:checked + .rice {
|
||||
"fixed": "
|
||||
#qr {
|
||||
top: auto !important;
|
||||
bottom: 1.7em !important;
|
||||
bottom: #{Style.pfOffset}em !important;
|
||||
#{Style.sidebarLocation[0]}: 0 !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
}"
|
||||
@ -1107,7 +1107,7 @@ input:checked + .rice {
|
||||
}
|
||||
#qr {
|
||||
top: auto !important;
|
||||
bottom: 1.7em !important;
|
||||
bottom: #{Style.pfOffset}em !important;
|
||||
#{Style.sidebarLocation[0]}: 0 !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
#{agent}transform: translateX(#{xOffset}93%);
|
||||
@ -1121,7 +1121,7 @@ input:checked + .rice {
|
||||
"tabbed slideout": "
|
||||
#qr {
|
||||
top: auto !important;
|
||||
bottom: 1.7em !important;
|
||||
bottom: #{Style.pfOffset}em !important;
|
||||
#{Style.sidebarLocation[0]}: 0 !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
#{agent}transform: translateX(#{xOffset}100%);
|
||||
@ -1159,7 +1159,7 @@ input:checked + .rice {
|
||||
#qr {
|
||||
overflow: visible;
|
||||
top: auto !important;
|
||||
bottom: 1.7em !important;
|
||||
bottom: #{Style.pfOffset}em !important;
|
||||
#{Style.sidebarLocation[0]}: 2px !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
opacity: 0.2;
|
||||
|
||||
@ -9,6 +9,7 @@ QR =
|
||||
textContent: 'QR'
|
||||
title: 'Quick Reply'
|
||||
href: 'javascript:;'
|
||||
|
||||
$.on sc, 'click', ->
|
||||
if !QR.nodes or QR.nodes.el.hidden
|
||||
$.event 'CloseMenu'
|
||||
@ -20,9 +21,6 @@ QR =
|
||||
|
||||
Header.addShortcut sc
|
||||
|
||||
if Conf['Hide Original Post Form']
|
||||
$.asap (-> doc), -> $.addClass doc, 'hide-original-post-form'
|
||||
|
||||
$.ready @initReady
|
||||
$.on d, '4chanXInitFinished', @persist if Conf['Persistent QR']
|
||||
|
||||
@ -51,7 +49,6 @@ QR =
|
||||
else
|
||||
QR.status()
|
||||
|
||||
|
||||
node: ->
|
||||
$.on $('a[title="Quote this post"]', @nodes.info), 'click', QR.quote
|
||||
|
||||
|
||||
@ -8,9 +8,9 @@ MascotTools =
|
||||
return if el then el.src = "" else null
|
||||
|
||||
position = "#{if Conf['Mascot Position'] is 'bottom' or (Conf['Mascot Position'] is "default" and Conf['Post Form Style'] isnt "fixed")
|
||||
0 + (if (g.VIEW isnt 'thread' or Conf['Bottom Header']) and Conf['4chan SS Navigation'] then 1.6 else 0)
|
||||
0 + Style.pfOffset
|
||||
else
|
||||
20.3 + (if g.VIEW isnt 'thread' or !!$ '#postForm input[name=spoiler]' then 1.4 else 0) + (if Conf['Show Post Form Header'] then 1.5 else 0) + (if Conf['Post Form Decorations'] then 0.2 else 0)
|
||||
19.6 + (if g.VIEW isnt 'thread' or !!$ '#postForm input[name=spoiler]' then 1.4 else 0) + (if Conf['Show Post Form Header'] then 1.5 else 0) + (if Conf['Post Form Decorations'] then 0.2 else 0) + Style.pfOffset
|
||||
}em"
|
||||
|
||||
# If we're editting anything, let's not change mascots any time we change a value.
|
||||
|
||||
@ -13,6 +13,7 @@ Style =
|
||||
prev = $ ".pagelist > .prev"
|
||||
prevA = $.el 'a',
|
||||
textContent: '<'
|
||||
|
||||
next = $ ".pagelist > .next"
|
||||
nextA = $.el 'a',
|
||||
textContent: '>'
|
||||
@ -21,6 +22,7 @@ Style =
|
||||
prevA.href = 'javascript:;'
|
||||
$.on prevA, 'click', ->
|
||||
prevAction.firstElementChild.click()
|
||||
|
||||
if (nextAction = next.firstElementChild).nodeName is 'FORM'
|
||||
nextA.href = 'javascript:;'
|
||||
$.on nextA, 'click', ->
|
||||
@ -33,7 +35,7 @@ Style =
|
||||
return unless $.id 'navtopright'
|
||||
|
||||
# Give ExLinks and 4sight a little time to append their dialog links
|
||||
setTimeout (->
|
||||
setTimeout ->
|
||||
Style.padding.nav = Header.bar
|
||||
Style.padding.pages = $(".pagelist", d.body)
|
||||
Style.padding()
|
||||
@ -42,7 +44,7 @@ Style =
|
||||
if exLink = $ "#navtopright .exlinksOptionsLink", d.body
|
||||
$.on exLink, "click", ->
|
||||
setTimeout Rice.nodes, 100
|
||||
), 500
|
||||
, 500
|
||||
|
||||
agent: "<% if (type === 'crx') { %>-webkit-<% } else if (type === 'userscript') { %>-moz-<% } else { %>-o-<% } %>"
|
||||
|
||||
@ -114,12 +116,11 @@ Style =
|
||||
nodes = d.head.children
|
||||
i = nodes.length
|
||||
while i--
|
||||
break unless Style.headCount
|
||||
return unless Style.headCount
|
||||
node = nodes[i]
|
||||
if (node.nodeName is 'STYLE' and !node.id) or ("#{node.rel}".contains('stylesheet') and node.href[..3] isnt 'data')
|
||||
Style.headCount--
|
||||
$.rm node
|
||||
continue
|
||||
return
|
||||
|
||||
filter: (text, background) ->
|
||||
@ -148,6 +149,11 @@ Style =
|
||||
_conf = Conf
|
||||
agent = Style.agent
|
||||
xOffset = if _conf["Sidebar Location"] is "left" then '-' else ''
|
||||
|
||||
Style.pfOffset = if _conf['4chan SS Navigation'] and ((_conf['Bottom Header'] and _conf['Fixed Header']) or (g.VIEW is 'index' and _conf['Pagination'] is 'sticky bottom'))
|
||||
1.5
|
||||
else
|
||||
0
|
||||
|
||||
# Position of submenus in relation to the post menu.
|
||||
position = {
|
||||
@ -332,7 +338,7 @@ Style =
|
||||
Style.padding.pages.property = _conf["Pagination"].split(" ")
|
||||
Style.padding.pages.property = Style.padding.pages.property[Style.padding.pages.property.length - 1]
|
||||
css = "body::before {\n"
|
||||
if Style.padding.pages and ["sticky top", "top", "sticky bottom"].contains _conf["Pagination"]
|
||||
if _conf['4chan SS Navigation'] and Style.padding.pages and ["sticky top", "top", "sticky bottom"].contains _conf["Pagination"]
|
||||
css += " #{Style.padding.pages.property}: #{Style.padding.pages.offsetHeight}px !important;\n"
|
||||
|
||||
if _conf['Fixed Header']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user