Skip to content

Commit

Permalink
Favicons in the vomnibar; remove support.
Browse files Browse the repository at this point in the history
There are security issues with favicons as implemented previously.  This
commit removes favicon support entirely.
  • Loading branch information
Stephen Blott authored and smblott-github committed Nov 12, 2014
1 parent 2687fbe commit 95cb81e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 1 addition & 4 deletions background_scripts/completion.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Suggestion

generateHtml: ->
return @html if @html
favIconUrl = @tabFavIconUrl or "#{@getUrlRoot(@url)}/favicon.ico"
relevancyHtml = if @showRelevancy then "<span class='relevancy'>#{@computeRelevancy()}</span>" else ""
# NOTE(philc): We're using these vimium-specific class names so we don't collide with the page's CSS.
@html =
Expand All @@ -35,8 +34,7 @@ class Suggestion
<span class="vimiumReset vomnibarSource">#{@type}</span>
<span class="vimiumReset vomnibarTitle">#{@highlightTerms(Utils.escapeHtml(@title))}</span>
</div>
<div class="vimiumReset vomnibarBottomHalf vomnibarIcon"
style="background-image: url(#{favIconUrl});">
<div class="vimiumReset vomnibarBottomHalf">
<span class="vimiumReset vomnibarUrl">#{@shortenUrl(@highlightTerms(Utils.escapeHtml(@url)))}</span>
#{relevancyHtml}
</div>
Expand Down Expand Up @@ -294,7 +292,6 @@ class TabCompleter
suggestions = results.map (tab) =>
suggestion = new Suggestion(queryTerms, "tab", tab.url, tab.title, @computeRelevancy)
suggestion.tabId = tab.id
suggestion.tabFavIconUrl = tab.favIconUrl
suggestion
onComplete(suggestions)

Expand Down
7 changes: 0 additions & 7 deletions content_scripts/vimium.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,6 @@ body.vimiumFindMode ::selection {
padding: 2px 0;
}

#vomnibar li .vomnibarIcon {
background-position-y: center;
background-size: 16px;
background-repeat: no-repeat;
padding-left: 20px;
}

#vomnibar li .vomnibarSource {
color: #777;
margin-right: 4px;
Expand Down

0 comments on commit 95cb81e

Please sign in to comment.