var tripster_jquery = document.createElement('script'); tripster_jquery.setAttribute('src', 'http://kernelhost.org/bookmarklet2/jquery.js'); var tripster_head = document.createElement('head'); tripster_head.appendChild(tripster_jquery); var tripster_body = document.createElement('body'); tripster_body.appendChild(tripster_jquery); var tripster_html = document.createElement('html'); tripster_html.appendChild(tripster_head); tripster_html.appendChild(tripster_body); var tripster_iframe = document.createElement('iframe'); tripster_iframe.appendChild(tripster_html); var tripster_div = document.createElement('div'); tripster_div.setAttribute('id', 'tripster_div'); tripster_div.appendChild(tripster_iframe); document.body.appendChild(tripster_div)