diff options
Diffstat (limited to 'chrome/browser/resources/new_new_tab.js')
-rw-r--r-- | chrome/browser/resources/new_new_tab.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index c0f32bf..b9404a6 100644 --- a/chrome/browser/resources/new_new_tab.js +++ b/chrome/browser/resources/new_new_tab.js @@ -587,9 +587,6 @@ OptionMenu.prototype = { } }; -// TODO(aa): The 'clear-all-blacklisted' feature needs to move into a menu in -// the most visited section. -/* var optionMenu = new OptionMenu($('option-button'), $('option-menu')); optionMenu.commands = { 'clear-all-blacklisted' : function() { @@ -607,16 +604,10 @@ optionMenu.commands = { saveShownSections(); } }; -*/ $('main').addEventListener('click', function(e) { - var p = e.target; - while (p && p.tagName != 'H2') { - p = p.parentNode; - } - - if (p) { - p = p.parentNode; + if (e.target.tagName == 'H2') { + var p = e.target.parentNode; var section = p.getAttribute('section'); if (section) { if (shownSections & Section[section]) @@ -815,8 +806,7 @@ function callGetSyncMessageIfSyncIsPresent() { } function hideAllMenus() { - // TODO(aa): See comment in definition of optionMenu. - //optionMenu.hide(); + optionMenu.hide(); } window.addEventListener('blur', hideAllMenus); |