svn commit: r41848 - head/en_US.ISO8859-1/htdocs/layout/js

Hiroki Sato hrs at FreeBSD.org
Thu Jun 6 14:29:36 UTC 2013


Glen Barber <gjb at FreeBSD.org> wrote
  in <20130606140542.GA1625 at glenbarber.us>:

gj> On Thu, Jun 06, 2013 at 07:59:17AM -0600, Warren Block wrote:
gj> > On Thu, 6 Jun 2013, Glen Barber wrote:
gj> >
gj> > >Author: gjb
gj> > >Date: Thu Jun  6 11:49:53 2013
gj> > >New Revision: 41848
gj> > >URL: http://svnweb.freebsd.org/changeset/doc/41848
gj> > >
gj> > >Log:
gj> > > Check for boolean 'true' case of w.n.dNT.
gj> > >
gj> > > Submitted by:	des
gj> > > Approved by:	doceng (implicit)
gj> > >
gj> > >Modified:
gj> > > head/en_US.ISO8859-1/htdocs/layout/js/google.js
gj> > >
gj> > >Modified: head/en_US.ISO8859-1/htdocs/layout/js/google.js
gj> > >==============================================================================
gj> > >--- head/en_US.ISO8859-1/htdocs/layout/js/google.js	Thu Jun  6 08:05:17 2013	(r41847)
gj> > >+++ head/en_US.ISO8859-1/htdocs/layout/js/google.js	Thu Jun  6 11:49:53 2013	(r41848)
gj> > >@@ -18,7 +18,7 @@ var h = document.location.host;
gj> > > */
gj> > >var fbsdregex = /((docs|security|svnweb|wiki|www)\.freebsd\.org|google\.com)/i;
gj> > >
gj> > >-if (window.navigator.doNotTrack === "yes") {
gj> > >+if (window.navigator.doNotTrack == true) {
gj> > >	allow_track = false;
gj> > >}
gj> >
gj> > Could that just be
gj> >
gj> >   if (window.navigator.doNotTrack) {
gj> >       allow_track = false;
gj> >   }
gj>
gj> Not as far as I can tell.  If DNT is not set,
gj> window.navigator.doNotTrack is null, so it would evaluate to:
gj>
gj>   if () {
gj>     allow_track = false;
gj>   }
gj>
gj> which I believe will always evaluate true.

 null, "", and undefined are evaluated as false in Javascript.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-doc-all/attachments/20130606/90c5c242/attachment.sig>


More information about the svn-doc-all mailing list