diff --git a/Core/Handling/TweetDeckBridge.cs b/Core/Handling/TweetDeckBridge.cs index a6966d50..270b949b 100644 --- a/Core/Handling/TweetDeckBridge.cs +++ b/Core/Handling/TweetDeckBridge.cs @@ -119,6 +119,10 @@ public void DisplayTooltip(string text, bool showInNotification){ } } + public void LoadNextNotification(){ + notification.InvokeSafe(notification.FinishCurrentTweet); + } + public void TryPasteImage(){ form.InvokeSafe(() => { if (Clipboard.ContainsImage()){ diff --git a/Core/Handling/TweetNotification.cs b/Core/Handling/TweetNotification.cs index feccfd4d..117396b3 100644 --- a/Core/Handling/TweetNotification.cs +++ b/Core/Handling/TweetNotification.cs @@ -20,7 +20,7 @@ private static string DefaultHeadTag{ private static string CustomCSS{ get{ - return @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}a[data-full-url]{word-break:break-all}"; + return @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}a[data-full-url]{word-break:break-all}#td-skip{opacity:0.75;cursor:pointer}#td-skip:hover{opacity:1}"; } } diff --git a/Resources/Scripts/notification.js b/Resources/Scripts/notification.js index ae64334f..22487a82 100644 --- a/Resources/Scripts/notification.js +++ b/Resources/Scripts/notification.js @@ -117,6 +117,25 @@ $TD.setNotificationTweetEmbedded(account[0].getAttribute("href")+"/status/"+tweetId); })(); + // + // Block: Setup a skip button. + // + (function(){ + if (document.body.hasAttribute("td-example-notification")){ + return; + } + + document.body.insertAdjacentHTML("afterbegin", [ + '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="17" viewBox="0 0 350 600" style="position:fixed;left:12px;bottom:8px;z-index:1000">', + '<path id="td-skip" fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">', + '</svg>' + ].join("")); + + document.getElementById("td-skip").addEventListener("click", function(){ + $TD.loadNextNotification(); + }); + })(); + // // Block: Page fully loaded. //