SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detect if google toolbar is used?

    Hi there,
    is there a way to detect whether the google toolbar is used by the visitor?

  2. #2
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay found this for IE, but is there also a way to detect it in firefox?

    Code:
    <html>
    <head>
    <!-- Part 1 of 2 : Place in document HEAD -->
    
    <object id="g1" classid="clsid:6CB5E471-C305-11D3-99A8-000086395495" style="display: none;"></object>
    <object id="g2" classid="clsid:00EF2092-6AC5-47c0-BD25-CF2D5D657FEB" style="display: none;"></object>
    
    <!-- End Part 1 of 2 -->
    </head>
    <body>
    
    <!-- Part 2 of 2 : Place in document BODY -->
    
    <script language="javascript" type="text/javascript">
    <!--
    if (navigator.appName == "Microsoft Internet Explorer") {
    if (document.GoogleActivated) {
    alert("The Google Toolbar \(" + document.GoogleToolbarVersion + "\) was detected on your computer.");
    }
    else if (document.g2 && typeof(g2.Search) != "undefined") {
    alert("The Google Toolbar was detected on your computer.");
    }
    else {
    alert("The Google Toolbar was not detected on your computer.");
    }
    }
    else {
    alert("The Google Toolbar requires Microsoft Windows and Internet Explorer 5.0 or higher.");
    }
    //-->
    </script>
    
    <!-- End Part 2 of 2 -->
    </body>
    </html>

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Why?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I would like to include a cool gimmick on one of my sites...

  5. #5
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anybody?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •