Advanced iFrame Test

[advanced_iframe src=”https://mind-hacking-tools.surge.sh/tool/mark-b4b-rewind” width=”100%” height=”650px”]

Experimental. Don’t touch anything below, not even at home. Especially not outside home!

Script stuff

Embedding tool test

Send message to tool[tcb-script]const iframeEl = document.getElementById(‘iframe’)iframeEl.src = getIframeSource()window.addEventListener(“message”, this.onMessage.bind(this));function messageTool(msg) {iframeEl.contentWindow.postMessage(msg, ‘*’)}function onMessage(evt) {console.log(“[MESSAGE FROM TOOL IFRAME]”, evt.data, evt);}function getIframeSource() {const baseUrl = isProd() ? “https://mind-hacking-tools.surge.sh/tool/” : “http://localhost:3000/tool/”const toolSlug = window.location.search.split(‘?tool=’)[1]return baseUrl + toolSlug}function isProd() {return window.location.host.includes(‘surge.sh’)}[/tcb-script]