I am trying to change javascript variable when iframing that page. Not the same, but did some similar on pinterest
if (top != self) {
$('body').html('<h1>Unauthorized</h1>')
}
Above is their code. I used this to cancel it
<iframe src="http://www.pinterest.com/?v=
if(top!%3Dself)%7B%24('body').html('%3Ch1%3EUna uthorized%3C%2Fh1%3E')%7D">
This works on chrome. So my question is, ccan we change javascript variables via iframe ?