how to disable google image search popup box

by lazfin
3 replies
I know you can tweak your browser to do this, but is there code you can put on your website?

When someone clicks on a google image search thumbnail, I'd like it to go directly to my web page rather than display the popup, forcing a second click to get in.

I have seen image thumbnails do that before, but of course I can't find them now!
#box #disable #google #image #popup #search
  • Profile picture of the author johnnyN
    not possible
    the search results are hosted on google servers, and you cannot affect any change on the google servers, only on your own server.
    {{ DiscussionBoard.errors[4626682].message }}
    • Profile picture of the author unnatural
      Originally Posted by johnnyN View Post

      not possible
      the search results are hosted on google servers, and you cannot affect any change on the google servers, only on your own server.
      Actually it is possible and it's actually very easy. I use it on everyone of my sites. When a user clicks on the image thumbnail, the thumbnail is simply displayed in an iframe. With javascript you can check for frames and break out of them.

      Here's the code:

      Code:
      <script type="text/javascript"> 
      function breakout_of_frame() {  
       if (top.location != location) {   
        top.location.href = document.location.href ;   
      } 
      } 
      </script> 
       </head> 
      <body onload="breakout_of_frame()">
      {{ DiscussionBoard.errors[4628164].message }}
      • Profile picture of the author lazfin
        Thanks unnatural, worked like a charm!
        {{ DiscussionBoard.errors[4633760].message }}

Trending Topics