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

Side by Side Diff: chrome/browser/resources/new_new_tab.js

Issue 385135: Tweaks for promo messages on NTP (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Helpers 2 // Helpers
3 3
4 // TODO(arv): Remove these when classList is available in HTML5. 4 // TODO(arv): Remove these when classList is available in HTML5.
5 // https://bugs.webkit.org/show_bug.cgi?id=20709 5 // https://bugs.webkit.org/show_bug.cgi?id=20709
6 function hasClass(el, name) { 6 function hasClass(el, name) {
7 return el.nodeType == 1 && el.className.split(/\s+/).indexOf(name) != -1; 7 return el.nodeType == 1 && el.className.split(/\s+/).indexOf(name) != -1;
8 } 8 }
9 9
10 function addClass(el, name) { 10 function addClass(el, name) {
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 var span = document.createElement('span'); 1586 var span = document.createElement('span');
1587 span.className = 'link-color'; 1587 span.className = 'link-color';
1588 while (el.hasChildNodes()) { 1588 while (el.hasChildNodes()) {
1589 span.appendChild(el.firstChild); 1589 span.appendChild(el.firstChild);
1590 } 1590 }
1591 el.appendChild(span); 1591 el.appendChild(span);
1592 } 1592 }
1593 1593
1594 updateAttribution(); 1594 updateAttribution();
1595 1595
1596 /* Close the promo notices when close button on the promo-line is clicked. */ 1596 // Closes the promo line when close button is clicked.
1597 $('promo-close').onclick = function (e) { 1597 $('promo-close').onclick = function (e) {
1598 $('promo-line').style.display = 'none'; 1598 $('footer').className = 'hide-footer';
1599 $('bottom-right-promo').style.display = 'none'; 1599 chrome.send('stopPromoLineMessage');
1600 chrome.send('stopPromoMessages');
1601 e.preventDefault(); 1600 e.preventDefault();
1602 }; 1601 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698