Skip to content

Commit

Permalink
Updated Twitter iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Aug 15, 2023
1 parent a9d7df3 commit e33918c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iframe/2/twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// NOTE: the link's opaque background blocks the view of the tweet while it's loading, but
// the "resize" event is fired so early in the process (before the tweet has finished
// loading) that we don't really miss anything
body.innerHTML = '<iframe allowfullscreen="" loading="eager" src="//platform.twitter.com/embed/Tweet.html?dnt=true&embedId=x&frame=false&hideCard=false&hideThread=false&id=' + id + '&lang=' + navigator.language.substring(0, 2) + '&theme=' + (isDark ? 'dark' : 'light') + '&widgetsVersion=940dd9ee54270%3A1649359550911&width=550px" scrolling=no></iframe><a href="//twitter.com/user/status/' + id + '" target="_blank" style="align-items:center;background:#' + (isDark ? '000' : 'fff') + ';border:solid 1px #' + (isDark ? '222;color:#fff' : 'cdd;filter:invert(1)') + ';border-radius:12px;box-sizing:border-box;display:flex;justify-content:center;padding:1em;top:0"><img alt="&#120143;" src="//abs.twimg.com/favicons/twitter.3.ico" width="30" height="30" onerror="nextSibling.innerHTML=\'Cannot connect to Twitter. Disable any adblocker and tracking prevention then try again.\'"><span>Loading tweet...</span></a>';
body.innerHTML = '<iframe allowfullscreen="" loading="eager" src="//platform.twitter.com/embed/Tweet.html?dnt=true&embedId=x&frame=false&hideCard=false&hideThread=false&id=' + id + '&lang=' + navigator.language.substring(0, 2) + '&theme=' + (isDark ? 'dark' : 'light') + '&widgetsVersion=940dd9ee54270%3A1649359550911&width=550px" scrolling=no></iframe><a href="//twitter.com/user/status/' + id + '" target="_blank" style="align-items:center;background:#' + (isDark ? '000' : 'fff') + ';border:solid 1px #' + (isDark ? '222;color:#fff' : 'cdd') + ';border-radius:12px;box-sizing:border-box;display:flex;justify-content:center;padding:1em;top:0"><img alt="&#120143;" src="//abs.twimg.com/favicons/twitter.3.ico" ' + (isDark ? '' : 'style="filter:invert(1)" ') = 'width="30" height="30" onerror="nextSibling.innerHTML=\'Cannot connect to Twitter. Disable any adblocker and tracking prevention then try again.\'"><span>Loading tweet...</span></a>';
};

window.onmessage = (e) =>
Expand Down

0 comments on commit e33918c

Please sign in to comment.