Skip to content

Instantly share code, notes, and snippets.

@voltrevo
Created May 10, 2017 05:02
Show Gist options
  • Select an option

  • Save voltrevo/0d1f5cbfd477bef7af031f07deaa6047 to your computer and use it in GitHub Desktop.

Select an option

Save voltrevo/0d1f5cbfd477bef7af031f07deaa6047 to your computer and use it in GitHub Desktop.
'use strict';
document.head.innerHTML = '';
document.body.innerHTML = '';
[0, 1].forEach((i) => {
const iframe = document.createElement('iframe');
iframe.src = location.href;
iframe.style.position = 'fixed';
iframe.style.left = (i === 0 ? '0' : '50vw');
iframe.style.overflow = 'auto';
iframe.style.top = '0';
iframe.style.width = '50vw';
iframe.style.height = '100vh';
document.body.appendChild(iframe);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment