From 92fc107026c5c48e38378ad3b7e1653b410d316b Mon Sep 17 00:00:00 2001 From: Ragnar-F Date: Mon, 15 Sep 2014 12:57:17 +0200 Subject: [PATCH] Navigation bei Search Engines verstecken --- static/content.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/content.js b/static/content.js index 300bd251..a35783be 100644 --- a/static/content.js +++ b/static/content.js @@ -1,4 +1,4 @@ -if (!IsInsideCHM()) +if (!IsInsideCHM() && !IsSearchEngine()) { BuildStructure(); AddContent(); @@ -345,4 +345,9 @@ function ShowIndex() function IsInsideCHM() { return (location.href.search(/::/) > 0) ? 1 : 0; +} + +function IsSearchEngine() +{ + return (navigator.userAgent.toLowerCase().indexOf('googlebot') < 0) ? 0 : 1; } \ No newline at end of file