Merge fixes from master
This commit is contained in:
parent
46af845baa
commit
8a9753d3d7
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
/* Updater + Stats */
|
||||
#updater,
|
||||
#stats {
|
||||
#{align}: 2px !important;
|
||||
#thread-stats {
|
||||
#{align}: #{if _conf["Updater Position"] is "bottom" and not _conf["Hide Delete UI"] then 23 else 2}px !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
top: auto !important;
|
||||
bottom: auto !important;
|
||||
#{if _conf["Updater Position"] is 'top' then "top: 1.6em !important" else "bottom: 0 !important"};
|
||||
#{if _conf["Updater Position"] is 'top' then "top: 18px !important" else "bottom: 0 !important"};
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
/* Updater + Stats */
|
||||
#updater,
|
||||
#stats {
|
||||
#{align}: #{if _conf["Updater Position"] is "top" then "24" else "2"}px !important;
|
||||
#thread-stats {
|
||||
#{align}: #{if _conf["Updater Position"] is "top" or not _conf["Hide Delete UI"] then 23 else 2}px !important;
|
||||
#{Style.sidebarLocation[1]}: auto !important;
|
||||
top: #{if _conf["Updater Position"] == "top" then "-1px" else "auto"} !important;
|
||||
bottom: #{if _conf["Updater Position"] == "bottom" then "-2px" else "auto"} !important;
|
||||
|
||||
@ -419,25 +419,25 @@ else "
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
padding: 0 1px 1px;
|
||||
border: 1px solid transparent;
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
}
|
||||
#updater:hover {
|
||||
z-index: 30;
|
||||
}
|
||||
#updater:not(:hover) > div:not(.move) {
|
||||
display: none;
|
||||
}
|
||||
#updater input {
|
||||
text-align: right;
|
||||
}
|
||||
#updater .rice {
|
||||
float: left;
|
||||
}
|
||||
#updater .field {
|
||||
width: 50px;
|
||||
}
|
||||
/* Stats */
|
||||
#stats {
|
||||
#thread-stats {
|
||||
position: fixed;
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
z-index: 10;
|
||||
}
|
||||
/* Image Expansion */
|
||||
#imgControls .menu-button {
|
||||
@ -573,7 +573,11 @@ hide: "
|
||||
padding: 2px;
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
}
|
||||
#{ if _conf['Slideout Watcher'] then "
|
||||
#watcher > div {
|
||||
max-height: 1.3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
#{if _conf['Slideout Watcher'] then "
|
||||
#watcher {
|
||||
width: #{width}px;
|
||||
#{Style.sidebarLocation[0]}: 2px !important;
|
||||
@ -585,7 +589,6 @@ hide: "
|
||||
text-decoration: #{if _conf["Underline Links"] then "underline" else "none"};
|
||||
}
|
||||
#watcher > div {
|
||||
max-height: 1.6em;
|
||||
overflow: hidden;
|
||||
}
|
||||
#watcher:hover {
|
||||
@ -600,13 +603,18 @@ hide: "
|
||||
#watcher {
|
||||
width: 200px;
|
||||
}
|
||||
#watcher:not(:hover) {
|
||||
max-height: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
"}
|
||||
/* Announcements */
|
||||
#globalMessage {
|
||||
text-align: center;
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
}
|
||||
#{if _conf['Announcements'] is 'slideout' then "
|
||||
#{{
|
||||
'slideout': "
|
||||
#globalMessage {
|
||||
position: fixed;
|
||||
padding: 2px;
|
||||
@ -626,7 +634,12 @@ hide: "
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
border: 0 none;
|
||||
}" else ""}
|
||||
}"
|
||||
'hide': "
|
||||
#globalMessage {
|
||||
display: none !important;
|
||||
}
|
||||
"}[_conf['Announcements']] or ""}
|
||||
/* Threads */
|
||||
.thread {
|
||||
margin: #{parseInt _conf["Top Thread Padding"], 10}px 0 #{parseInt _conf["Bottom Thread Padding"], 10}px 0;
|
||||
@ -711,10 +724,26 @@ hide: "
|
||||
outline: none;
|
||||
}
|
||||
.reply.post {
|
||||
display: inline-block;
|
||||
#{Style.sizing}: border-box;
|
||||
#{if _conf["Fit Width Replies"] then "width: 100%;" else ""}
|
||||
}
|
||||
#{if _conf["Fit Width Replies"] then "
|
||||
.reply.post {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
.image_expanded .reply.post {
|
||||
width: 100%;
|
||||
}
|
||||
" else "
|
||||
.reply.post {
|
||||
display: inline-block;
|
||||
}
|
||||
"}
|
||||
.image_expanded .reply.post {
|
||||
display: inline-block;
|
||||
overflow: visible;
|
||||
clear: both;
|
||||
}
|
||||
.post {
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
}
|
||||
@ -730,7 +759,7 @@ s {
|
||||
clear: right;
|
||||
}
|
||||
#{if _conf['Force Reply Break'] or _conf["OP Background"] then "
|
||||
.op.post .postMessage {
|
||||
.op.post .postMessage::after {
|
||||
display: block;
|
||||
content: ' ';
|
||||
clear: both;
|
||||
@ -747,7 +776,7 @@ s {
|
||||
}" else ""}
|
||||
/* Summary */
|
||||
#{
|
||||
if _conf["Fit Width Replies"]
|
||||
if _conf["Force Reply Break"]
|
||||
".summary { clear: both; float: left; }"
|
||||
else ""
|
||||
}
|
||||
@ -946,14 +975,18 @@ input:checked + .rice {
|
||||
top: 0;
|
||||
}
|
||||
/* Select Dropdown */
|
||||
.selectrice ul {
|
||||
#selectrice {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
z-index: 32;
|
||||
}
|
||||
#selectrice:empty {
|
||||
display: none;
|
||||
}
|
||||
/* Post Form */
|
||||
#qr {
|
||||
z-index: 20;
|
||||
@ -1372,9 +1405,6 @@ a:only-of-type > .remove {
|
||||
padding: 0;
|
||||
#{if _conf["Rounded Edges"] then "border-radius: 3px;" else ""}
|
||||
}
|
||||
#appchanx-settings .selectrice ul {
|
||||
border-radius: 0;
|
||||
}
|
||||
.section-container {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
@ -1420,7 +1450,7 @@ a:only-of-type > .remove {
|
||||
.rice_tab li:nth-of-type(2n+1),
|
||||
.style_tab li:nth-of-type(2n+1),
|
||||
.keybinds_tab li:nth-of-type(2n+1),
|
||||
.selectrice li:nth-of-type(2n+1) {
|
||||
#selectrice li:nth-of-type(2n+1) {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
article li {
|
||||
|
||||
@ -68,8 +68,7 @@ html {
|
||||
#prefetch,
|
||||
#showQR,
|
||||
#{unless _conf["Post Form Decorations"] then '#spoilerLabel,' else ''}
|
||||
#stats,
|
||||
#updater:not(:hover) .move {
|
||||
#thread-stats {
|
||||
text-shadow:
|
||||
1px 1px 0 #{backgroundC},
|
||||
-1px -1px 0 #{backgroundC},
|
||||
@ -107,7 +106,7 @@ s:not(:hover) {
|
||||
#appchanx-settings,
|
||||
#qrtab,
|
||||
#{if _conf["Post Form Decorations"] then "#qr," else ""}
|
||||
#updater:hover,
|
||||
#updater,
|
||||
input[type="submit"],
|
||||
input[value="Report"],
|
||||
span[style="left: 5px; position: absolute;"] a {
|
||||
@ -134,9 +133,9 @@ textarea {
|
||||
}
|
||||
#dump:hover,
|
||||
#qr-filename-container:hover,
|
||||
#appchanx-settings .selectrice li:nth-of-type(2n+1):hover,
|
||||
.selectrice:hover,
|
||||
.selectrice li:hover,
|
||||
#selectrice li:hover,
|
||||
#selectrice li:nth-of-type(2n+1):hover,
|
||||
input:hover,
|
||||
textarea:hover {
|
||||
background: #{theme["Hovered Input Background"]};
|
||||
@ -145,8 +144,8 @@ textarea:hover {
|
||||
}
|
||||
#dump:active,
|
||||
#dump:focus,
|
||||
#selectrice li:focus,
|
||||
.selectrice:focus,
|
||||
.selectrice li:focus,
|
||||
input:focus,
|
||||
textarea:focus,
|
||||
textarea.field:focus {
|
||||
@ -251,7 +250,7 @@ textarea {
|
||||
}
|
||||
#exlinks-options-content > table,
|
||||
#appchanx-settings ul,
|
||||
.selectrice ul {
|
||||
#selectrice {
|
||||
border-bottom: 1px solid #{theme["Reply Border"]};
|
||||
box-shadow: inset #{theme["Shadow Color"]} 0 0 5px;
|
||||
}
|
||||
@ -374,7 +373,7 @@ a .name {
|
||||
border-color: #{if Style.lightTheme then "rgba(0,0,0,0.1)" else "rgba(255,255,255,0.1)"};
|
||||
}
|
||||
#appchanx-settings li,
|
||||
.selectrice li:not(:first-of-type) {
|
||||
#selectrice li:not(:first-of-type) {
|
||||
border-top: 1px solid #{if Style.lightTheme then "rgba(0,0,0,0.05)" else "rgba(255,255,255,0.025)"};
|
||||
}
|
||||
#navtopright .exlinksOptionsLink::after,
|
||||
|
||||
@ -531,37 +531,43 @@ Rice =
|
||||
|
||||
selectclick: ->
|
||||
e.stopPropagation()
|
||||
if Rice.ul
|
||||
return Rice.remSelect()
|
||||
unless {ul} = Rice
|
||||
Rice.ul = ul = $.el 'ul',
|
||||
id: "selectrice"
|
||||
$.add d.body, ul
|
||||
|
||||
if ul.children.length > 0
|
||||
return Rice.rmOption()
|
||||
|
||||
rect = @getBoundingClientRect()
|
||||
{clientHeight} = d.documentElement
|
||||
ul = Rice.ul = $.el 'ul',
|
||||
id: "selectrice"
|
||||
{style} = ul
|
||||
style.width = "#{rect.width}px"
|
||||
if clientHeight - rect.bottom < 200
|
||||
style.bottom = "#{clientHeight - rect.top}px"
|
||||
else
|
||||
style.top = "#{rect.bottom}px"
|
||||
style.left = "#{rect.left}px"
|
||||
input = @previousSibling
|
||||
for option in input.options
|
||||
|
||||
style.cssText = "width: #{rect.width}px; left: #{rect.left}px;" + (if clientHeight - rect.bottom < 200 then "bottom: #{clientHeight - rect.top}px" else "top: #{rect.bottom}px")
|
||||
Rice.select = @previousSibling
|
||||
nodes = []
|
||||
|
||||
for option in Rice.select.options
|
||||
li = $.el 'li',
|
||||
textContent: option.textContent
|
||||
li.setAttribute 'data-value', option.value
|
||||
|
||||
$.on li, 'click', (e) ->
|
||||
e.stopPropagation()
|
||||
container = @parentElement.parentElement
|
||||
input = container.previousSibling
|
||||
select = Rice.select
|
||||
container = select.nextElementSibling
|
||||
container.firstChild.textContent = @textContent
|
||||
input.value = @getAttribute 'data-value'
|
||||
ev = document.createEvent 'HTMLEvents'
|
||||
ev.initEvent "change", true, true
|
||||
$.event input, ev
|
||||
Rice.remSelect()
|
||||
$.add ul, li
|
||||
nodes.push li
|
||||
$.add ul, nodes
|
||||
|
||||
$.on ul, 'click scroll blur', (e) ->
|
||||
e.stopPropagation()
|
||||
|
||||
$.on d, 'click scroll blur resize', Rice.remSelect
|
||||
$.add @, ul
|
||||
|
||||
|
||||
@ -3864,8 +3864,13 @@ Favicon =
|
||||
ThreadStats =
|
||||
init: ->
|
||||
return if g.VIEW isnt 'thread' or !Conf['Thread Stats']
|
||||
@dialog = UI.dialog 'thread-stats', 'bottom: 0; left: 0;', """
|
||||
<div class=move><span id=post-count>0</span> / <span id=file-count>0</span></div>
|
||||
html = '<span id=post-count>0</span> / <span id=file-count>0</span>'
|
||||
if Conf['Thread Updater']
|
||||
@dialog = $.el 'span',
|
||||
innerHTML: "[ #{html} ]"
|
||||
else
|
||||
@dialog = UI.dialog 'thread-stats', 'bottom: 0; left: 0;', """
|
||||
<div class=move>#{html}</div>
|
||||
"""
|
||||
|
||||
@postCountEl = $ '#post-count', @dialog
|
||||
@ -3883,11 +3888,17 @@ ThreadStats =
|
||||
ThreadStats.thread = @
|
||||
ThreadStats.update postCount, fileCount
|
||||
$.on d, 'ThreadUpdate', ThreadStats.onUpdate
|
||||
$.add d.body, ThreadStats.dialog
|
||||
if Conf['Thread Updater']
|
||||
$.asap (-> $('.move', ThreadUpdater.dialog)), ->
|
||||
$.prepend $('.move', ThreadUpdater.dialog), ThreadStats.dialog
|
||||
else
|
||||
$.add d.body, ThreadStats.dialog
|
||||
|
||||
onUpdate: (e) ->
|
||||
return if e.detail[404]
|
||||
{postCount, fileCount} = e.detail
|
||||
ThreadStats.update postCount, fileCount
|
||||
|
||||
update: (postCount, fileCount) ->
|
||||
{thread, postCountEl, fileCountEl} = ThreadStats
|
||||
postCountEl.textContent = postCount
|
||||
@ -3911,7 +3922,7 @@ ThreadUpdater =
|
||||
<div><label title='Controls whether *this* thread automatically updates or not'><input type=checkbox name='Auto Update This' #{checked}> Auto Update This</label></div>
|
||||
<div><label><input type=number name=Interval class=field min=5 value=#{Conf['Interval']}> Refresh rate (s)</label></div>
|
||||
<div><input value='Update' type=button name='Update'></div>
|
||||
"""
|
||||
"""
|
||||
|
||||
@dialog = UI.dialog 'updater', 'bottom: 0; right: 0;', html
|
||||
@timer = $ '#update-timer', @dialog
|
||||
|
||||
@ -413,8 +413,8 @@ Main =
|
||||
'Thread Excerpt': ThreadExcerpt
|
||||
'Favicon': Favicon
|
||||
'Unread': Unread
|
||||
'Thread Stats': ThreadStats
|
||||
'Thread Updater': ThreadUpdater
|
||||
'Thread Stats': ThreadStats
|
||||
'Thread Watcher': ThreadWatcher
|
||||
'Index Navigation': Nav
|
||||
'Keybinds': Keybinds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user