Skip to content

Commit

Permalink
Navigation bei Search Engines verstecken
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragnar-F committed Sep 15, 2014
1 parent 997b994 commit 92fc107
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion static/content.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (!IsInsideCHM())
if (!IsInsideCHM() && !IsSearchEngine())
{
BuildStructure();
AddContent();
Expand Down Expand Up @@ -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;
}

0 comments on commit 92fc107

Please sign in to comment.