From 9d6bb471c00384bcaa687dee091bb65baccbc554 Mon Sep 17 00:00:00 2001 From: garrying Date: Mon, 15 Mar 2021 22:36:03 +0000 Subject: [PATCH] deploy: f0e50e25419466cf6f88aa4de909b386cd08a743 --- 2021/03/01/initial-seeds/index.html | 3 --- 404.html | 3 --- about/index.html | 3 --- assets/js/scripts.js | 26 ++++++++++++++------------ bentway.html | 5 +---- colophon/index.html | 3 --- digital-public-garden.html | 5 +---- feed.xml | 2 +- hypercore.html | 5 +---- hypertext-transfer-protocol.html | 5 +---- hypertext.html | 5 +---- hypha.html | 5 +---- index.html | 3 --- infrastructure.html | 5 +---- ipfs.html | 5 +---- peer-to-peer.html | 5 +---- protocol.html | 5 +---- public.html | 5 +---- publishing.html | 5 +---- rss.html | 5 +---- statement-of-intent.html | 5 +---- world-wide-web.html | 5 +---- 22 files changed, 30 insertions(+), 88 deletions(-) diff --git a/2021/03/01/initial-seeds/index.html b/2021/03/01/initial-seeds/index.html index 38ac3c1..a7b9704 100644 --- a/2021/03/01/initial-seeds/index.html +++ b/2021/03/01/initial-seeds/index.html @@ -62,9 +62,6 @@ Economy as a form a expression

- - diff --git a/404.html b/404.html index 615856b..bed8594 100644 --- a/404.html +++ b/404.html @@ -36,9 +36,6 @@ - - diff --git a/about/index.html b/about/index.html index 4024c81..4c3f930 100644 --- a/about/index.html +++ b/about/index.html @@ -26,9 +26,6 @@ - - diff --git a/assets/js/scripts.js b/assets/js/scripts.js index 36e9ec2..cb9682d 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -4,7 +4,6 @@ let opacityTimeout let contentTimeout const transitionDurationMs = 100 -const iframe = document.getElementById('link-preview-iframe') const tooltipWrapper = document.getElementById('tooltip-wrapper') const tooltipContent = document.getElementById('tooltip-content') @@ -24,19 +23,22 @@ function showTooltip (event) { const top = window.pageYOffset || document.documentElement.scrollTop if (event.target.host === window.location.host) { - iframe.src = event.target.href - iframe.onload = function () { - let tooltipContentHtml = '' - tooltipContentHtml += '
' + iframe.contentWindow.document.querySelector('h1').innerHTML + '
' - tooltipContentHtml += iframe.contentWindow.document.querySelector('.note-contents').innerHTML + window.fetch(event.target.href) + .then(response => response.text()) + .then(data => { + const parser = new window.DOMParser() + const doc = parser.parseFromString(data, 'text/html') + let tooltipContentHtml = '' + tooltipContentHtml += '
' + doc.querySelector('h1').innerHTML + '
' + tooltipContentHtml += doc.querySelector('.note-contents').innerHTML - tooltipContent.innerHTML = tooltipContentHtml + tooltipContent.innerHTML = tooltipContentHtml - tooltipWrapper.style.display = 'block' - setTimeout(function () { - tooltipWrapper.style.opacity = 1 - }, 1) - } + tooltipWrapper.style.display = 'block' + setTimeout(function () { + tooltipWrapper.style.opacity = 1 + }, 1) + }) tooltipWrapper.style.left = elemProps.left - (tooltipWrapper.offsetWidth / 2) + (elemProps.width / 2) + 'px' if ((window.innerHeight - elemProps.top) < (tooltipWrapper.offsetHeight)) { diff --git a/bentway.html b/bentway.html index 877af11..f4e1a05 100644 --- a/bentway.html +++ b/bentway.html @@ -10,7 +10,7 @@

Bentway

-