Skip to content

Commit e25c40b

Browse files
committed
fix(oEmbed): Bring iframe in line with the embed in the GUI
1 parent dc14e4a commit e25c40b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lambda/oembed/oembed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function handler(event, context, callback) {
3535
}
3636

3737
const { url, referrer, maxwidth = 900, maxheight = 300 } = params;
38+
const iframeSrc = url.replace('gist', 'embed');
3839

3940
callback(null, {
4041
statusCode: 200,
@@ -47,7 +48,7 @@ function handler(event, context, callback) {
4748
provider_name: 'testing-playground.com',
4849
provider_url: host,
4950

50-
html: `<iframe src="${url}" width="${maxwidth}" height="${maxheight}" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true" title="Testing Playground" style="overflow: hidden; display: block;" loading="lazy" name="testing-playground-${Date.now()}"></iframe>`,
51+
html: `<iframe src="${iframeSrc}?panes=preview,result" height="${maxheight}" width="${maxwidth}" scrolling="no" frameBorder="0" allowTransparency="true" title="Testing Playground" style="overflow: hidden; display: block; width: 100%"></iframe>`,
5152
width: maxwidth,
5253
height: maxheight,
5354

0 commit comments

Comments
 (0)