Custom site frame killer code

Discussion in 'JavaScript' started by 24wallpapers, Jan 7, 2013.

  1. #1
    Hi guys ,

    I was looking for frame breaker code or frame killer scripts , In which i can Kill all frames expect Stumble frame , Plz help me .

    I mean a frame killer code which kill all frames except Stumble frame
     
    24wallpapers, Jan 7, 2013 IP
  2. Basti

    Basti Active Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    3
    Trophy Points:
    90
    #2
    Something like this might work. Long time since i used the code, but should still work ( the exception not tested ).
    Problem is that you cant get the outter frame url i think, so maybe checking the referrer works, if they dont hide it or fake it

    
    <script type="text/javascript"> 
    <!-- 
    var ref = document.referrer;
    // If outer most window location is not your loaded location
    if (top.location != self.location) { 
        // If there is a ref and match stumble
        if (ref && /stumbleupon/.test(ref)) { 
            // Do nothing 
        } 
        else { top.location=self.location.href; } 
    } 
    //--> 
    </script>
    
    Code (markup):
     
    Basti, Jan 8, 2013 IP
  3. 24wallpapers

    24wallpapers Active Member

    Messages:
    300
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Not working :(
     
    24wallpapers, Jan 14, 2013 IP
  4. Basti

    Basti Active Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    3
    Trophy Points:
    90
    #4
    Not working in overall? or just not for the stumble?
     
    Basti, Jan 14, 2013 IP