OLD | NEW |
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 Loading... |
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 }; |
OLD | NEW |