kanema / javascript_iframe_detect

Detect if the html is printed inside a iframe using javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript Iframe Detect

Description

Detect if the html is printed inside a iframe using javascript. This function was originally created to Facebook applications.

Using

// To use just pass the url in the function you want to redirect if it is within an iframe.
if ( ! is_iframe) {
	window.location.href = 'http://www.kanema.com.br/';
};

About

Detect if the html is printed inside a iframe using javascript.


Languages

Language:JavaScript 100.0%