Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3158)

Unified Diff: chrome/browser/resources/md_history/history.js

Issue 1648803003: MD History: Drop-down menu allows searching for history-items by domain name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@search_functionality
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/history.js
diff --git a/chrome/browser/resources/md_history/history.js b/chrome/browser/resources/md_history/history.js
index 276e62544bdaaa59d5781a389b045d63ce4d3c7f..104e2a076715b0f078eb6512d204657d9667d4a9 100644
--- a/chrome/browser/resources/md_history/history.js
+++ b/chrome/browser/resources/md_history/history.js
@@ -67,3 +67,11 @@ window.addEventListener('refresh-results', function(e) {
$('history-card-manager').resetHistoryResults();
chrome.send('queryHistory', [e.detail.search, 0, 0, 0, RESULTS_PER_PAGE]);
});
+
+/**
+ * When the drop-down menu is used to search for results by domain, set the
+ * search bar to reflect the search term being used.
+ */
+window.addEventListener('more-from-site', function(e) {
+ $('toolbar').setSearchTerm(e.detail.search);
+});

Powered by Google App Engine
This is Rietveld 408576698