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

Unified Diff: chrome/browser/resources/contextual_search/promo.js

Issue 456833003: [Search] Make the text swoosh away off the screen when the user taps the opt-in link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 4 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
« no previous file with comments | « chrome/browser/resources/contextual_search/promo.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/contextual_search/promo.js
diff --git a/chrome/browser/resources/contextual_search/promo.js b/chrome/browser/resources/contextual_search/promo.js
index 516822f5e091ab820a4da1e692dfa2a537f0e80a..dfdf1eff11cb81ffa5a248ceddd33a42f15a5157 100644
--- a/chrome/browser/resources/contextual_search/promo.js
+++ b/chrome/browser/resources/contextual_search/promo.js
@@ -1,5 +1,14 @@
/* Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
- TODO(mathp): Add some JS here.
*/
+
+/**
+ * On load, registers the handler to add the 'hide' class to the container
+ * element in order to hide it.
+ */
+window.onload = function() {
+ $('optin-label').addEventListener('click', function() {
+ $('container').classList.add('hide');
+ });
+};
« no previous file with comments | « chrome/browser/resources/contextual_search/promo.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698