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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1580 function fixLinkUnderline(el) { | 1580 function fixLinkUnderline(el) { |
1581 var span = document.createElement('span'); | 1581 var span = document.createElement('span'); |
1582 span.className = 'link-color'; | 1582 span.className = 'link-color'; |
1583 while (el.hasChildNodes()) { | 1583 while (el.hasChildNodes()) { |
1584 span.appendChild(el.firstChild); | 1584 span.appendChild(el.firstChild); |
1585 } | 1585 } |
1586 el.appendChild(span); | 1586 el.appendChild(span); |
1587 } | 1587 } |
1588 | 1588 |
1589 updateAttribution(); | 1589 updateAttribution(); |
1590 | |
1591 /* Close the promo notices when close button on the promo-line is clicked. */ | |
arv (Not doing code reviews)
2009/11/16 17:47:48
// Comment in JS.
/**
* JSDoc comment
*/
In th
Miranda Callahan
2009/11/16 22:10:54
Done.
| |
1592 $('promo-close').onclick = function (e) { | |
1593 $('promo-line').style.display = 'none'; | |
1594 $('bottom-right-promo').style.display = 'none'; | |
1595 chrome.send('stopPromoMessages'); | |
1596 e.preventDefault(); | |
1597 }; | |
OLD | NEW |