To see how this works - or not -, just load the web pages framebusting1.html and framebusting2.html which include this page inside an iframe.
Below some animation to check if javascript is executed. Reload the page to re-active the animation.