Menu

Coordination Headwind - How Organizations Are Like Slime Molds

Hacker News·about 2 months ago
#MI3PIee0
Reading 0:00
15s threshold

html, body, iframe {
width: 100%; height: 100%; margin: 0; padding: 0; max-width: initial; }
iframe { border: 0; flex-grow: 1 }

function getSlideHash() {
let hash = window.location.hash;
[key, value] = hash.split('=');
if (key != '#slide') return '';
let numeric_value = Number(value);
if (isNaN(numeric_value)) return '';
return hash;
}

window.addEventListener('DOMContentLoaded', () => {
console.log('DOMContentLoaded');
let iframe = document.querySelector('iframe');
let updateHash = () => {
let url = new URL(iframe.src);
url.hash = getSlideHash();
iframe.src = url.toString();
}
updateHash();
iframe.addEventListener('load', () => iframe.contentWindow.focus());
window.addEventListener('hashchange', updateHash);
});

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-321674-2');