Fix for iFrame detection after updating jQuery

Switing to .on() after updating jQuery.
Changes to url extraction because of different event handling