Bug 159634

Summary: [patch] add Javascriptt
Product: Documentation Reporter: Eitan Adler <eadler>
Component: Books & ArticlesAssignee: Glen Barber <gjb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Eitan Adler freebsd_committer freebsd_triage 2011-08-09 19:40:08 UTC
Index: header.ent
===================================================================
RCS file: /home/ncvs/www/share/sgml/header.ent,v
retrieving revision 1.16
diff -u -r1.16 header.ent
--- header.ent  27 Mar 2011 11:28:34 -0000      1.16
+++ header.ent  9 Aug 2011 18:28:46 -0000
@@ -79,6 +79,30 @@
 ]]>
 <!ENTITY header1.rsslink ''>
 
+  <!ENTITY header1.google "
+  <script type='text/javascript'>
+   var _gaq = _gaq || [];
+   _gaq.push(['_setAccount', 'UA-22767463-1']);
+   _gaq.push(['_trackPageview']);
+   _gaq.push(['_setCustomVar',
+       5, // use the last index in case we just don't care ;-)
+       'Real Operating System',
+       navigator.platform,
+       1 // Lets track this by 'visitor' (per cookie). If we need more
+         // fine grained data we could always change it later
+    ]);
+
+   (function() {
+    var ga = document.createElement('script');
+    ga.type = 'text/javascript';
+    ga.async = true;
+    ga.src = 'https://ssl.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0];
+   s.parentNode.insertBefore(ga, s);
+   })();
+  </script>
+">
+
 <!ENTITY header1 '
 <head>
   <title>&title;</title>
@@ -86,6 +110,7 @@
   &header1.link;
   &header1.rsslink;
   <script type="text/javascript" src="&enbase;/layout/js/styleswitcher.js"></script>
+  &header1.google;
 </head>
 '>
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2011-08-09 19:42:39 UTC
Responsible Changed
From-To: freebsd-www->gjb

per request
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2011-08-09 20:06:06 UTC
----Security_Multipart(Wed_Aug_10_04_06_06_2011_696)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Eitan Adler <lists@eitanadler.com> wrote
  in <201108091830.p79IUArg039671@red.freebsd.org>:

li>
li> >Number:         159634
li> >Category:       www
li> >Synopsis:       [patch] add Javascriptt

 I prefer to add a small javascript file and just add a <script type
 ="text/javascript" src="..."/> line into each HTML file.

 Also, if we are going to add a link of Google Analytics on all of the
 HTML files, please consider to add it to ones in the doc tree, too.

-- Hiroki

----Security_Multipart(Wed_Aug_10_04_06_06_2011_696)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk5BhR4ACgkQTyzT2CeTzy3NLQCeMLELI3UM6311b4I7wwLs2fk3
bJsAn3SYDmKAfDxjRaiELUPtF2ay7rLb
=8Yb9
-----END PGP SIGNATURE-----

----Security_Multipart(Wed_Aug_10_04_06_06_2011_696)----
Comment 3 Glen Barber freebsd_committer freebsd_triage 2011-08-09 20:28:48 UTC
On 8/9/11 3:10 PM, Hiroki Sato wrote:
>   I prefer to add a small javascript file and just add a <script type
>   ="text/javascript" src="..."/> line into each HTML file.
>  
>   Also, if we are going to add a link of Google Analytics on all of the
>   HTML files, please consider to add it to ones in the doc tree, too.
>  


Hi Hiroki,

Agreed on both.

Regards,

Glen

-- 
Glen Barber | gjb@FreeBSD.org
FreeBSD Documentation Project
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-08-15 01:30:28 UTC
gjb         2011-08-15 00:30:17 UTC

  FreeBSD doc repository

  Modified files:
    en                   index.xsl 
    en/layout/js         Makefile 
  Added files:
    en/layout/js         google.js 
  Log:
  Add javascript to the www/ tree for Google Analytics.
  
  This will also be active on the doc/ tree once we're sure there are no
  problems.
  
  PR:             159634
  Submitted by:   eadler
  
  Revision  Changes    Path
  1.173     +2 -1      www/en/index.xsl
  1.2       +3 -2      www/en/layout/js/Makefile
  1.1       +22 -0     www/en/layout/js/google.js (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Glen Barber freebsd_committer freebsd_triage 2011-08-15 01:30:32 UTC
State Changed
From-To: open->patched

Committed to the www/ tree.  Will enable this on doc/ once we're sure 
there are no issues.
Comment 6 Glen Barber freebsd_committer freebsd_triage 2012-01-31 14:17:15 UTC
State Changed
From-To: patched->closed

hrs committed a change yesterday that will allow the doc tree to be 
built with JavaScript.