fix links to comments

This commit is contained in:
igoradamenko
2018-04-17 12:08:34 +03:00
parent 09c93627b6
commit d29981868f
4 changed files with 20 additions and 3 deletions
+10 -1
View File
@@ -8,7 +8,6 @@
</head>
<body>
<div id="remark42"></div>
<script type="text/javascript" src="remark.js"></script>
<script>
var lastHeight = 0;
setInterval(() => {
@@ -17,6 +16,16 @@
window.parent.postMessage(JSON.stringify({ remarkIframeHeight: lastHeight }), '*');
}
}, 200);
window.addEventListener('message', updateHash);
function updateHash(event) {
try {
const data = JSON.parse(event.data);
location.hash = data.hash;
} catch (e) {}
}
</script>
<script type="text/javascript" src="remark.js"></script>
</body>
</html>