generated from adobecom/milo-college
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreviewer.html
40 lines (35 loc) · 1.15 KB
/
previewer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.addEventListener('message', async (e) => {
const u = JSON.parse(event.data).url;
const res = await fetch(`${u}?martech=off`);
const block = await res.text();
document.querySelector('body main').innerHTML = block;
// Create a new meta tag
const metaTag = document.createElement('meta');
// Set the attributes for the meta tag
metaTag.name = 'template'; // Specify the meta tag name
metaTag.content = 'helpxNext-article'; // Set the content
// Append the meta tag to the head section
document.head.appendChild(metaTag);
console.log('Meta tag added:', metaTag);
const { loadArea } = await import(
`https://main--milo--adobecom.hlx.live/libs/utils/utils.js`
);
await loadArea();
});
</script>
<script src="./scripts/preview.js" type="module"></script>
<style>
body {
display: none;
}
</style>
<link rel="icon" href="data:," />
</head>
<body>
<main></main>
</body>
</html>