Fix regular expression testing for 'freebsd.org' domain [1]
Don't look for plain 'freebsd.org' Pointy hat to: gjb [1] Pointed out by: simon [2]
This commit is contained in:
parent
71d3293359
commit
7ac36b27cf
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=37565
1 changed files with 4 additions and 4 deletions
|
@ -1,12 +1,12 @@
|
|||
/* $FreeBSD: www/en/layout/js/google.js,v 1.2 2011/08/16 23:19:35 gjb Exp $ */
|
||||
/* $FreeBSD: www/en/layout/js/google.js,v 1.3 2011/08/17 03:20:07 gjb Exp $ */
|
||||
|
||||
h=document.location.host;
|
||||
var h=document.location.host;
|
||||
/*
|
||||
* Check that the hosting domain is actually a FreeBSD.org domain, so
|
||||
* we don't accidentally obtain data from mirrors.
|
||||
*/
|
||||
fbsdregex=/m/((www|wiki)\.)?freebsd\.org\/(.*)?/i;
|
||||
if (h.test(fbsdregex)) {
|
||||
var fbsdregex=/(www|wiki)\.freebsd\.org\/(.*)?/i;
|
||||
if (fbsdregex.test(h)) {
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-22767463-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue