Skip to content

Commit

Permalink
testing thread embed again
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeberv committed Sep 2, 2024
1 parent 9c2cd6e commit b3ae527
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions _news/2024-08-01-science-advances.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ I've written some additional comments about this work in the twitter thread here
</div>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

{% raw %}
<div class="container">
<div id="thread-header" class="d-flex align-items-center">
</div>
Expand Down Expand Up @@ -111,7 +112,6 @@ I've written some additional comments about this work in the twitter thread here
</style>

<script>
// Load the Twitter widgets script and wait for it to be ready
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
Expand All @@ -129,7 +129,6 @@ I've written some additional comments about this work in the twitter thread here
return t;
}(document, "script", "twitter-wjs"));

// Fetch and display the thread content after Twitter widgets are ready
window.twttr.ready(function() {
async function fetchThreadReaderContent() {
const proxyUrl = 'https://cors-anywhere.herokuapp.com/';
Expand Down Expand Up @@ -174,7 +173,7 @@ I've written some additional comments about this work in the twitter thread here
}
}

// Call the function to fetch and display the thread content
fetchThreadReaderContent();
});
</script>
</script>
{% endraw %}

0 comments on commit b3ae527

Please sign in to comment.