Remove trailing "/(.*)?" from regex check - document.location.host only
returns the hostname, not trailing page information. With input from: simon
This commit is contained in:
parent
7ac36b27cf
commit
cba5de5c7c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=37566
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
||||||
/* $FreeBSD: www/en/layout/js/google.js,v 1.3 2011/08/17 03:20:07 gjb Exp $ */
|
/* $FreeBSD: www/en/layout/js/google.js,v 1.4 2011/08/17 13:21:14 gjb Exp $ */
|
||||||
|
|
||||||
var h=document.location.host;
|
var h=document.location.host;
|
||||||
/*
|
/*
|
||||||
* Check that the hosting domain is actually a FreeBSD.org domain, so
|
* Check that the hosting domain is actually a FreeBSD.org domain, so
|
||||||
* we don't accidentally obtain data from mirrors.
|
* we don't accidentally obtain data from mirrors.
|
||||||
*/
|
*/
|
||||||
var fbsdregex=/(www|wiki)\.freebsd\.org\/(.*)?/i;
|
var fbsdregex=/(www|wiki)\.freebsd\.org/i;
|
||||||
if (fbsdregex.test(h)) {
|
if (fbsdregex.test(h)) {
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
_gaq.push(['_setAccount', 'UA-22767463-1']);
|
_gaq.push(['_setAccount', 'UA-22767463-1']);
|
||||||
|
|
Loading…
Reference in a new issue