mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 18:15:47 +02:00
Add a button to skip current notification
This commit is contained in:
parent
5f249d4603
commit
6b79c89f42
@ -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()){
|
||||
|
@ -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}";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user