1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-26 17:54:52 +02:00

disqus hash links

This commit is contained in:
Pomax
2020-09-25 21:09:41 -07:00
parent e0f770b2c8
commit d1caf2f8dc
10 changed files with 64 additions and 23 deletions

View File

@@ -31,7 +31,7 @@
<meta property="og:locale" content="en-GB" />
<meta property="og:type" content="article" />
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
<meta property="og:updated_time" content="2020-09-25T23:03:04+00:00" />
<meta property="og:updated_time" content="2020-09-26T04:08:40+00:00" />
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
<meta property="og:section" content="Bézier Curves" />
<meta property="og:tag" content="Bézier Curves" />
@@ -7170,7 +7170,16 @@ for(let L = 1; L <= order; L++) {
<a href="https://github.com/Pomax/bezierinfo/blob/master/LICENSE.md">almost no rights reserved</a>. Go do something cool with it!
</footer>
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
<script>
if (window.location.hash.includes(`#comment-`)) {
const baseHash = window.location.hash;
document.addEventListener(`disqus:ready`, () => {
console.log(`setting location`);
window.location.hash = ``;
window.location.hash = baseHash;
});
document.getElementById(`disqus_thread`).scrollIntoView();
}
</script>
</body>
</html>

View File

@@ -33,7 +33,7 @@
<meta property="og:locale" content="ja-JP" />
<meta property="og:type" content="article" />
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
<meta property="og:updated_time" content="2020-09-25T23:03:04+00:00" />
<meta property="og:updated_time" content="2020-09-26T04:08:40+00:00" />
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
<meta property="og:section" content="Bézier Curves" />
<meta property="og:tag" content="Bézier Curves" />
@@ -7007,7 +7007,16 @@ for(let L = 1; L <= order; L++) {
<a href="https://github.com/Pomax/bezierinfo/blob/master/LICENSE.md">almost no rights reserved</a>. Go do something cool with it!
</footer>
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
<script>
if (window.location.hash.includes(`#comment-`)) {
const baseHash = window.location.hash;
document.addEventListener(`disqus:ready`, () => {
console.log(`setting location`);
window.location.hash = ``;
window.location.hash = baseHash;
});
document.getElementById(`disqus_thread`).scrollIntoView();
}
</script>
</body>
</html>

View File

@@ -13,6 +13,13 @@ let loadDisqus = () => {
globalThis.disqus_config = function () {
this.page.url = "https://pomax.github.io/bezierinfo";
this.page.identifier = "bezierinfo";
this.callbacks.onReady = [
function () {
setTimeout(() => {
document.dispatchEvent(new CustomEvent(`disqus:ready`));
}, 200);
},
];
};
const script = document.createElement("script");

View File

@@ -27,7 +27,7 @@
<meta property="og:locale" content="en-GB" />
<meta property="og:type" content="article" />
<meta property="og:published_time" content="Thu Sep 17 2020 17:00:00 +00:00" />
<meta property="og:updated_time" content="Fri Sep 25 2020 16:03:04 +00:00" />
<meta property="og:updated_time" content="Fri Sep 25 2020 21:08:40 +00:00" />
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
<meta property="og:section" content="Bézier Curves" />
<meta property="og:tag" content="Bézier Curves" />
@@ -255,8 +255,5 @@ draw() {
<hr />
<footer class="copyright">This post is a news entry for the <a href="https://pomax.github.io/bezierinfo/">Primer on Bézier Curves</a></footer>
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
</body>
</html>

View File

@@ -26,7 +26,7 @@
<meta property="og:description" content="" />
<meta property="og:locale" content="en-GB" />
<meta property="og:type" content="article" />
<meta property="og:published_time" content="Fri Sep 25 2020 16:03:04 GMT-0700 (Pacific Daylight Time)" />
<meta property="og:published_time" content="Fri Sep 25 2020 21:08:40 GMT-0700 (Pacific Daylight Time)" />
<meta property="og:updated_time" content="" />
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
<meta property="og:section" content="Bézier Curves" />
@@ -101,8 +101,5 @@
<hr />
<footer class="copyright">This post is a news entry for the <a href="..">Primer on Bézier Curves</a></footer>
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
</body>
</html>

View File

@@ -6,7 +6,7 @@
<atom:link href="https://pomax.github.io/bezierinfo" rel="self"></atom:link>
<description>News updates for the <a href="https://pomax.github.io/bezierinfo">primer on Bézier Curves</a> by Pomax</description>
<language>en-GB</language>
<lastBuildDate>Fri Sep 25 2020 16:03:04 +00:00</lastBuildDate>
<lastBuildDate>Fri Sep 25 2020 21:08:40 +00:00</lastBuildDate>
<image>
<url>https://pomax.github.io/bezierinfo/images/og-image.png</url>
<title>A Primer on Bézier Curves</title>

View File

@@ -33,7 +33,7 @@
<meta property="og:locale" content="zh-CN" />
<meta property="og:type" content="article" />
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
<meta property="og:updated_time" content="2020-09-25T23:03:04+00:00" />
<meta property="og:updated_time" content="2020-09-26T04:08:40+00:00" />
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
<meta property="og:section" content="Bézier Curves" />
<meta property="og:tag" content="Bézier Curves" />
@@ -6981,7 +6981,16 @@ for(let L = 1; L <= order; L++) {
<a href="https://github.com/Pomax/bezierinfo/blob/master/LICENSE.md">almost no rights reserved</a>. Go do something cool with it!
</footer>
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
<script>
if (window.location.hash.includes(`#comment-`)) {
const baseHash = window.location.hash;
document.addEventListener(`disqus:ready`, () => {
console.log(`setting location`);
window.location.hash = ``;
window.location.hash = baseHash;
});
document.getElementById(`disqus_thread`).scrollIntoView();
}
</script>
</body>
</html>

View File

@@ -79,9 +79,18 @@
{% endblock %}
</footer>
{% block scrollfix %}
<!-- fix firefox's scroll position algorithm. Due to how it works, it cannot be async/defer -->
<script src="./js/site/fix-scroll.js"></script>
{% block commenthash %}
<script>
if (window.location.hash.includes(`#comment-`)) {
const baseHash = window.location.hash;
document.addEventListener(`disqus:ready`, () => {
console.log(`setting location`);
window.location.hash = ``;
window.location.hash = baseHash;
});
document.getElementById(`disqus_thread`).scrollIntoView();
}
</script>
{% endblock %}
</body>

View File

@@ -33,3 +33,5 @@
{% block footer %}
This post is a news entry for the <a href="..">Primer on Bézier Curves</a>
{% endblock%}
{% block commenthash %}{% endblock %}

View File

@@ -19,3 +19,5 @@
{% block footer %}
This post is a news entry for the <a href="https://pomax.github.io/bezierinfo/">Primer on Bézier Curves</a>
{% endblock %}
{% block commenthash %}{% endblock %}