]>
cat aescling's git repositories - mastodon.git/blob - public/embed.js
4 var ready = function(loaded
) {
5 if (['interactive', 'complete'].indexOf(document
.readyState
) !== -1) {
8 document
.addEventListener('DOMContentLoaded', loaded
);
15 window
.addEventListener('message', function(e
) {
16 var data
= e
.data
|| {};
18 if (data
.type
!== 'setHeight' || !iframes
[data
.id
]) {
22 iframes
[data
.id
].height
= data
.height
;
25 [].forEach
.call(document
.querySelectorAll('iframe.mastodon-embed'), function(iframe
) {
26 iframe
.scrolling
= 'no';
27 iframe
.style
.overflow
= 'hidden';
31 var id
= iframes
.length
- 1;
33 iframe
.onload = function() {
34 iframe
.contentWindow
.postMessage({
This page took 0.07584 seconds and 4 git commands to generate.