1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-02 11:34:08 +02:00
TweetDuck/Resources/Scripts/screenshot.js

15 lines
556 B
JavaScript

(function($TD){
let ele = document.getElementsByTagName("article")[0];
ele.style.width = window.outerWidth+"px";
ele.style.position = "absolute";
let contentHeight = ele.offsetHeight;
ele.style.position = "static";
let avatar = ele.querySelector(".tweet-avatar");
let avatarBottom = avatar ? avatar.getBoundingClientRect().bottom : 0;
$TD.setHeight(Math.floor(Math.max(contentHeight, avatarBottom+9)));
setTimeout($TD.triggerScreenshot, document.getElementsByTagName("iframe").length ? 267 : 67);
})($TD_NotificationScreenshot);