Skip to content

Commit

Permalink
Link hints context menu; better match philc#1312 look.
Browse files Browse the repository at this point in the history
  • Loading branch information
smblott-github committed Jan 31, 2016
1 parent 43e59ac commit 0b1b1e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions content_scripts/link_hints.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -759,11 +759,13 @@ class ContextMenuMode extends Mode
# If there's no link text, then don't include menu entries which require it.
""
else
"<li><span class=\"vimiumHintContextMenuText\">#{entry.text}</span>
<span class=\"vimiumHintContextMenuKey\"n>#{entry.key}</span></li>"
"<li><span class=\"vimiumHintContextMenuItem\">
<span class=\"vimiumHintContextMenuKey\"n>#{entry.key}</span>
<span class=\"vimiumHintContextMenuText\">#{entry.text}</span>
</span></li>"

menuGroupHTMLs = (group.join "" for group in menuEntries)
menuHTML = menuGroupHTMLs.join "<hr class=\"vimiumHintContextMenuHR\"/>"
menuHTML = menuGroupHTMLs.join "<li><hr class=\"vimiumHintContextMenuHR\"/></li>"
menuElement.innerHTML = "<ul>#{menuHTML}</ul>"

# FIXME(smblott) It would be better to wait until the menu has been rendered and only *then* (once we know
Expand Down
11 changes: 6 additions & 5 deletions content_scripts/vimium.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ div.vimiumHintContextMenu {
div.vimiumHintContextMenu > ul {
list-style-type: none;
list-style: none;
margin-bottom: 0px;
padding-left: 5px;
padding-right: 5px;
margin-bottom: 0px;
}

div.vimiumHintContextMenu > ul > li {
Expand All @@ -134,10 +134,11 @@ div.vimiumHintContextMenu > ul, div.vimiumHintContextMenu > ul > li {
}

.vimiumHintContextMenuKey {
float: right;
color: #888888;
width: 10px;
text-align: center;
color:#2f508e; /* Matches blue of help page. */
float: left;
width: 20px;
font-weight: bold;
font-size: 15px;
}

.vimiumHintContextMenuHR {
Expand Down

0 comments on commit 0b1b1e8

Please sign in to comment.