Remove JS error, when no iframe exist

If the iframe is not represented on the page, this code will not be executed.
Merge pull request #1 from nikri/patch-1

Remove JS error, when no iframe exist