Show the alt/shift+click shortcuts to watch/hide threads in the catalog thread menu.
This commit is contained in:
parent
4f5b06c5ec
commit
bd1babd898
@ -146,14 +146,17 @@ Index =
|
|||||||
return if g.VIEW isnt 'index' or !Conf['JSON Navigation'] or !Conf['Menu'] or !Conf['Thread Hiding Link'] or g.BOARD.ID is 'f'
|
return if g.VIEW isnt 'index' or !Conf['JSON Navigation'] or !Conf['Menu'] or !Conf['Thread Hiding Link'] or g.BOARD.ID is 'f'
|
||||||
|
|
||||||
Menu.menu.addEntry
|
Menu.menu.addEntry
|
||||||
el: $.el 'a', href: 'javascript:;'
|
el: $.el 'a',
|
||||||
|
href: 'javascript:;'
|
||||||
|
className: 'has-shortcut-text'
|
||||||
|
, <%= html('<span></span><span class="shortcut-text">Shift+click</span>') %>
|
||||||
order: 20
|
order: 20
|
||||||
open: ({thread}) ->
|
open: ({thread}) ->
|
||||||
return false if Conf['Index Mode'] isnt 'catalog'
|
return false if Conf['Index Mode'] isnt 'catalog'
|
||||||
@el.textContent = if thread.isHidden
|
@el.firstElementChild.textContent = if thread.isHidden
|
||||||
'Unhide thread'
|
'Unhide'
|
||||||
else
|
else
|
||||||
'Hide thread'
|
'Hide'
|
||||||
$.off @el, 'click', @cb if @cb
|
$.off @el, 'click', @cb if @cb
|
||||||
@cb = ->
|
@cb = ->
|
||||||
$.event 'CloseMenu'
|
$.event 'CloseMenu'
|
||||||
|
|||||||
@ -42,14 +42,17 @@ ThreadWatcher =
|
|||||||
|
|
||||||
if g.VIEW is 'index' and Conf['JSON Navigation'] and Conf['Menu'] and g.BOARD.ID isnt 'f'
|
if g.VIEW is 'index' and Conf['JSON Navigation'] and Conf['Menu'] and g.BOARD.ID isnt 'f'
|
||||||
Menu.menu.addEntry
|
Menu.menu.addEntry
|
||||||
el: $.el 'a', href: 'javascript:;'
|
el: $.el 'a',
|
||||||
|
href: 'javascript:;'
|
||||||
|
className: 'has-shortcut-text'
|
||||||
|
, <%= html('<span></span><span class="shortcut-text">Alt+click</span>') %>
|
||||||
order: 6
|
order: 6
|
||||||
open: ({thread}) ->
|
open: ({thread}) ->
|
||||||
return false if Conf['Index Mode'] isnt 'catalog'
|
return false if Conf['Index Mode'] isnt 'catalog'
|
||||||
@el.textContent = if ThreadWatcher.isWatched thread
|
@el.firstElementChild.textContent = if ThreadWatcher.isWatched thread
|
||||||
'Unwatch thread'
|
'Unwatch'
|
||||||
else
|
else
|
||||||
'Watch thread'
|
'Watch'
|
||||||
$.off @el, 'click', @cb if @cb
|
$.off @el, 'click', @cb if @cb
|
||||||
@cb = ->
|
@cb = ->
|
||||||
$.event 'CloseMenu'
|
$.event 'CloseMenu'
|
||||||
|
|||||||
@ -1703,6 +1703,16 @@ a:only-of-type > .remove {
|
|||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
.entry.has-shortcut-text {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.entry .shortcut-text {
|
||||||
|
opacity: 0.5;
|
||||||
|
font-size: 70%;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
.has-submenu::after {
|
.has-submenu::after {
|
||||||
content: "";
|
content: "";
|
||||||
border-left: .5em solid;
|
border-left: .5em solid;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user