1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 function addGplusButton() {
8 var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
9 po.src = 'https://apis.google.com/js/plusone.js?onload=onLoadCallback';
10 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
13 function openFeedback(e) {
15 userfeedback.api.startFeedback({productId: 86265});
18 function addGoogleFeedback() {
19 [].forEach.call(document.querySelectorAll('[data-feedback]'), function(el, i) {
20 el.addEventListener('click', openFeedback);
25 // Auto syntax highlight all pre tags.
26 function prettyPrintCode() {
27 var pres = document.querySelectorAll('pre');
28 for (var i = 0, pre; pre = pres[i]; ++i) {
29 pre.classList.add('prettyprint');
31 window.prettyPrint && prettyPrint();