OLD | NEW |
(Empty) | |
| 1 (function() { |
| 2 |
| 3 function addGplusButton() { |
| 4 var po = document.createElement('script'); po.type = 'text/javascript'; po.asy
nc = true; |
| 5 po.src = 'https://apis.google.com/js/plusone.js?onload=onLoadCallback'; |
| 6 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(
po, s); |
| 7 } |
| 8 |
| 9 function openFeedback(e) { |
| 10 e.preventDefault(); |
| 11 userfeedback.api.startFeedback({productId: 86265}); |
| 12 } |
| 13 |
| 14 function addGoogleFeedback() { |
| 15 [].forEach.call(document.querySelectorAll('[data-feedback]'), function(el, i)
{ |
| 16 el.addEventListener('click', openFeedback); |
| 17 }); |
| 18 } |
| 19 |
| 20 |
| 21 // Auto syntax highlight all pre tags. |
| 22 function prettyPrintCode() { |
| 23 var pres = document.querySelectorAll('pre'); |
| 24 for (var i = 0, pre; pre = pres[i]; ++i) { |
| 25 pre.classList.add('prettyprint'); |
| 26 } |
| 27 window.prettyPrint && prettyPrint(); |
| 28 } |
| 29 |
| 30 prettyPrintCode(); |
| 31 addGoogleFeedback(); |
| 32 addGplusButton(); |
| 33 |
| 34 })(); |
OLD | NEW |