mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-01 17:34:10 +02:00
Fix screenshot script modifying original elements and missing html classes
This commit is contained in:
parent
cac6d1f889
commit
02e8dc3440
@ -316,8 +316,14 @@
|
|||||||
|
|
||||||
window.TDGF_triggerScreenshot = function(){
|
window.TDGF_triggerScreenshot = function(){
|
||||||
if (selectedTweet){
|
if (selectedTweet){
|
||||||
|
var realWidth = selectedTweet.width();
|
||||||
|
var realHeight = selectedTweet.height()-selectedTweet.find("footer").last().height();
|
||||||
|
|
||||||
|
selectedTweet = selectedTweet.clone();
|
||||||
|
selectedTweet.children().first().addClass($(document.documentElement).attr("class"));
|
||||||
selectedTweet.find("footer").last().remove();
|
selectedTweet.find("footer").last().remove();
|
||||||
$TD.screenshotTweet(selectedTweet.html(), selectedTweet.width(), selectedTweet.height());
|
|
||||||
|
$TD.screenshotTweet(selectedTweet.html(), realWidth, realHeight);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user