Created
January 11, 2020 07:59
-
-
Save oeway/0d6cdbbabecff899eb6c0eddc4ab3ddf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(window && window.location && window.location.protocol === 'file:'){ | |
const preview = window.open("https://deploy-preview-268--imjoy.netlify.com/#/preview"); | |
window.addEventListener("message", function(ev) { | |
if (ev.data.type === "imjoy-app-ready") { | |
preview.postMessage({ type: "load-imjoy-plugin", code: document.body.innerHTML }, "*"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment