Fix Labels, IDColor, IDHighlight

This commit is contained in:
Zixaphir 2015-01-13 17:06:11 -07:00
parent 790a88dfd9
commit 4ef2b61c25
9 changed files with 47 additions and 33 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -103,11 +103,13 @@ PostHiding =
@cb = -> PostHiding.menu.show post
$.on @el, 'click', @cb
true
thisPost =
el: UI.checkbox 'thisPost', 'This post', false
open: (post) ->
@el.firstChild.checked = post.isHidden
true
replies =
el: UI.checkbox 'replies', 'Show replies', false
open: (post) ->

View File

@ -287,6 +287,7 @@ Main =
['Announcement Hiding', PSAHiding]
['Fourchan thingies', Fourchan]
['Color User IDs', IDColor]
['Highlight by User ID', IDHighlight]
['Custom CSS', CustomCSS]
['Linkify', Linkify]
['Reveal Spoilers', RemoveSpoilers]
@ -303,6 +304,7 @@ Main =
['Delete Link', DeleteLink]
['Filter (Menu)', Filter.menu]
['Download Link', DownloadLink]
['Labels list', Labels]
['Archive Link', ArchiveLink]
['Quote Inlining', QuoteInline]
['Quote Previewing', QuotePreview]

View File

@ -158,6 +158,7 @@ UI = do ->
onFocus: (e) =>
e.stopPropagation()
@focus e.target
focus: (entry) ->
while focused = $.x 'parent::*/child::*[contains(@class,"focused")]', entry
$.rmClass focused, 'focused'

View File

@ -1247,11 +1247,14 @@ nav a,
.inline .menu-button {
opacity: 1;
}
.color-user-ids .posteruid .hand {
.posteruid .painted {
padding: .1em .3em;
border-radius: 1em;
font-size: 80%;
}
.hand {
cursor: pointer;
}
div.post div.postInfo {
padding: 1px 3px;
display: block !important;

View File

@ -207,7 +207,7 @@ class Post
PostHiding.makeButton false
$.tn " #{@getNameBlock()}"
]
$.add @nodes.stub, Menu.makeButton() if Conf['Menu']
$.add @nodes.stub, Menu.makeButton @ if Conf['Menu']
$.prepend @nodes.root, @nodes.stub
show: (showRecursively=Conf['Recursive Hiding']) ->
return if !@isHidden

View File

@ -9,8 +9,7 @@ Labels =
{labels} = post.origin or post
return false unless labels.length
@subEntries.length = 0
for label in labels
addSubEntry el: $.el 'div', textContent: label
@subEntries = (el: $.el 'div', textContent: label for label in labels)
true
subEntries: []

View File

@ -19,7 +19,6 @@ IDColor =
style.color = rgb[3]
style.backgroundColor = "rgb(#{rgb[0]},#{rgb[1]},#{rgb[2]})"
$.addClass span, 'painted'
span.title = 'Highlight posts by this ID'
compute: (uid) ->
# Convert chars to integers, bitshift and math to create a larger integer