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

Unified Diff: chrome/common/extensions/docs/static/js/site.js

Issue 102593005: Clean patch with DCC static content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests for sidenav_data_source Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/static/js/site.js
diff --git a/chrome/common/extensions/docs/static/js/site.js b/chrome/common/extensions/docs/static/js/site.js
new file mode 100644
index 0000000000000000000000000000000000000000..bd9e4e9653aecc19de03b8713b145334dbae8390
--- /dev/null
+++ b/chrome/common/extensions/docs/static/js/site.js
@@ -0,0 +1,34 @@
+(function() {
+
+function addGplusButton() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js?onload=onLoadCallback';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+}
+
+function openFeedback(e) {
+ e.preventDefault();
+ userfeedback.api.startFeedback({productId: 86265});
+}
+
+function addGoogleFeedback() {
+ [].forEach.call(document.querySelectorAll('[data-feedback]'), function(el, i) {
+ el.addEventListener('click', openFeedback);
+ });
+}
+
+
+// Auto syntax highlight all pre tags.
+function prettyPrintCode() {
+ var pres = document.querySelectorAll('pre');
+ for (var i = 0, pre; pre = pres[i]; ++i) {
+ pre.classList.add('prettyprint');
+ }
+ window.prettyPrint && prettyPrint();
+}
+
+prettyPrintCode();
+addGoogleFeedback();
+addGplusButton();
+
+})();
« no previous file with comments | « chrome/common/extensions/docs/static/js/search.js ('k') | chrome/common/extensions/docs/templates/articles/pillar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698