1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-08-20 09:49:46 +02:00
Files
Configuration
Core
Data
Plugins
Properties
Resources
Design
Guide
Plugins
Scripts
pages
styles
code.js
introduction.js
notification.js
plugins.browser.js
plugins.js
plugins.notification.js
screenshot.js
twitter.js
update.js
Utilities
PostBuild.ps1
ScriptLoader.cs
avatar.png
icon-small.ico
icon-tray-new.ico
icon-tray.ico
icon.ico
spinner.apng
Updates
bld
lib
subprocess
tests
video
.gitattributes
.gitignore
LICENSE.md
Program.cs
README.md
Reporter.cs
TweetDuck.csproj
TweetDuck.sln
TweetDuck.sln.DotSettings
packages.config
TweetDuck/Resources/Scripts/screenshot.js
2018-04-15 16:24:26 +02:00

16 lines
565 B
JavaScript

(function($TD){
let ele = document.getElementsByTagName("article")[0];
ele.style.width = "{width}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))).then(() => {
setTimeout($TD.triggerScreenshot, document.getElementsByTagName("iframe").length ? 267 : 67);
});
})($TD_NotificationScreenshot);