Skip to content

Commit

Permalink
Updated Bluesky iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Oct 24, 2024
1 parent fcb8970 commit b2d6dca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions iframe/2/bluesky.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
{
port = e.ports[0];

const m = /^#at:\/(\/[\w.:]+\/[\w.:]+\/[\w.:]+)$/.exec(window.location.hash);
const m = /^#at:\/(\/[\w.:]+\/[\w.:]+\/[\w.:]+)(?:#([.\w]+))?$/.exec(window.location.hash);
if (m)
{
iframe.loading = 'eager';
iframe.scrolling = 'no';
iframe.src = '//embed.bsky.app/embed' + m[1] + '?id=0';
iframe.src = '//' + (m[2] || 'embed.bsky.app') + '/embed' + m[1] + '?id=0';

document.body.append(iframe);
}
}
Expand Down
2 changes: 1 addition & 1 deletion iframe/2/bluesky.min.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><title>Content from Bluesky</title><style>body{margin:0}iframe{border:0;height:100vh;width:100%}</style><script>((e,c)=>{c.onload=()=>{let b=e.createElement('iframe'),d;c.onmessage=a=>{if('s9e:init'!==a.data||d)a.source===b.contentWindow&&+a.data.height&&d.postMessage(+a.data.height);else if(d=a.ports[0],a=/^#at:\/(\/[\w.:]+\/[\w.:]+\/[\w.:]+)$/.exec(c.location.hash))b.loading='eager',b.scrolling='no',b.src='//embed.bsky.app/embed'+a[1]+'?id=0',e.body.append(b)}}})(document,window)</script>
<!DOCTYPE html><title>Content from Bluesky</title><style>body{margin:0}iframe{border:0;height:100vh;width:100%}</style><script>((e,c)=>{c.onload=()=>{let b=e.createElement('iframe'),d;c.onmessage=a=>{if('s9e:init'!==a.data||d)a.source===b.contentWindow&&+a.data.height&&d.postMessage(+a.data.height);else if(d=a.ports[0],a=/^#at:\/(\/[\w.:]+\/[\w.:]+\/[\w.:]+)(?:#([.\w]+))?$/.exec(c.location.hash))b.loading='eager',b.scrolling='no',b.src='//'+(a[2]||'embed.bsky.app')+'/embed'+a[1]+'?id=0',e.body.append(b)}}})(document,window)</script>

0 comments on commit b2d6dca

Please sign in to comment.