diff options
author | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 17:06:54 +0000 |
---|---|---|
committer | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 17:06:54 +0000 |
commit | 652de427da3996810157fe2c6cb6de410a61c86d (patch) | |
tree | 713d406e5a638b482ca1c4203aa4cb5777d927f0 | |
parent | 28d679296ec30b869f318d366f6b1f58d8afc63b (diff) | |
download | chromium_src-652de427da3996810157fe2c6cb6de410a61c86d.zip chromium_src-652de427da3996810157fe2c6cb6de410a61c86d.tar.gz chromium_src-652de427da3996810157fe2c6cb6de410a61c86d.tar.bz2 |
Hides the "Remove thumbnails" link when the most visited intro is shown.
BUG=None
TEST=With an empty history, open a new tab. The NTP should not show the link
to "Remove thumbnails". Browse 3 different sites and open a new tab again. The
link "Remove thumbnails" should now be visible.
Review URL: http://codereview.chromium.org/115787
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16994 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/new_tab.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html index 455cdb2..b93bc1b 100644 --- a/chrome/browser/resources/new_tab.html +++ b/chrome/browser/resources/new_tab.html @@ -415,15 +415,16 @@ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded); </div> <a href="#" class="manage non-edit-visible" - onClick="enterEditMode(); return false"> + onclick="enterEditMode(); return false" + id="editthumbnails"> <span jscontent="editthumbnails"></span></a> - <button type="button" class="edit-visible" onClick="exitEditMode();" + <button type="button" class="edit-visible" onclick="exitEditMode();" jscontent="doneediting"></button> - <button type="button" class="edit-visible" onClick="cancelEdits();" + <button type="button" class="edit-visible" onclick="cancelEdits();" jscontent="cancelediting"></button> <a href="#" class="manage edit-visible" - onClick="restoreThumbnails(); return false"> + onclick="restoreThumbnails(); return false"> <span jscontent="restorethumbnails"></span></a> <a href="#" jsvalues="href:showhistoryurl" @@ -592,11 +593,12 @@ function renderMostVisitedPages(pages) { // Show the most visited helptext if most visited is still useless. This is // a crappy heuristic. if (pages.length < 3) { - document.getElementById("mostvisitedintro").style.display = "block"; + $('mostvisitedintro').style.display = 'block'; + $('editthumbnails').style.display = 'none'; return; } - document.getElementById('mostvisitedintro').style.display = 'none'; + $('mostvisitedintro').style.display = 'none'; // Create the items and add them to rows. var rows = []; |