From 00a0da3df3df0da2c215faec7890d8fcd3886e09 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Sun, 8 Oct 2017 01:42:53 +0200 Subject: [PATCH] Fix detail view screenshots & tweak screenshot timings for iframes separately --- Core/Notification/Screenshot/FormNotificationScreenshotable.cs | 2 +- Resources/Scripts/code.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Notification/Screenshot/FormNotificationScreenshotable.cs b/Core/Notification/Screenshot/FormNotificationScreenshotable.cs index 423632c7..5bd3e488 100644 --- a/Core/Notification/Screenshot/FormNotificationScreenshotable.cs +++ b/Core/Notification/Screenshot/FormNotificationScreenshotable.cs @@ -22,7 +22,7 @@ public FormNotificationScreenshotable(Action callback, FormBrowser owner, Plugin browser.LoadingStateChanged += (sender, args) => { if (!args.IsLoading){ using(IFrame frame = args.Browser.MainFrame){ - ScriptLoader.ExecuteScript(frame, "window.setTimeout($TD_NotificationScreenshot.trigger, 129)", "gen:screenshot"); + ScriptLoader.ExecuteScript(frame, "window.setTimeout($TD_NotificationScreenshot.trigger, document.getElementsByTagName('iframe').length ? 267 : 67)", "gen:screenshot"); } } }; diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index ea62020a..95b3b9e8 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -580,7 +580,7 @@ setImportantProperty(selectedTweet.find(".js-media-preview-container"), "margin-bottom", "4px"); selectedTweet.find(".js-translate-call-to-action").first().remove(); selectedTweet.find(".js-tweet").first().nextAll().remove(); - selectedTweet.find("footer").last().prevUntil(":not(.txt-mute.txt-small)").addBack().remove(); // footer, date, location + selectedTweet.find("footer").last().prevUntil(":not(.txt-mute)").addBack().remove(); // footer, date, location } else{ setImportantProperty(selectedTweet.find(".js-media-preview-container"), "margin-bottom", "10px");