Thread: Bluesky Embeds
View Single Post
Old 12-21-2024, 11:26 AM   #22
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Yeah exactly. The BBCode for that creates this:

Code:
<div class="tweet" tweetID="1866972053145870417"></div><a href="https://twitter.com/user/status/1866972053145870417" target="_blank">https://twitter.com/user/status/1866972053145870417</a>
And then there's this code at the end of each page which imports the Javascript script and then iterates over all the tweets on a page and does the replacement:

Code:
<script sync src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script>
  window.onload = (function(){
    var tweets = document.querySelectorAll("div.tweet");
    tweets.forEach(
      function(tweet) {
        var id = tweet.getAttribute("tweetID");
        twttr.widgets.createTweet(
          id, tweet, 
          {
            conversation : 'none',    // or all
            cards        : 'visible',  // or visible 
          }
		);
      }
    );
  });
</script>
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote