1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-14 21:15:48 +02:00

Make middle click on tweet reply icon open the compose drawer

This commit is contained in:
chylex 2017-06-08 14:17:46 +02:00
parent 3326ad52ce
commit a710cb9d4f

View File

@ -595,6 +595,26 @@
});
});
//
// Block: Make middle click on tweet reply icon open the compose drawer.
//
app.delegate(".js-reply-action", "mousedown", function(e){
if (e.which === 2){
if ($("[data-drawer='compose']").hasClass("is-hidden")){
$(document).trigger("uiDrawerShowDrawer", {
drawer: "compose",
withAnimation: true
});
window.setTimeout(() => $(this).trigger("click"), 1);
}
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
}
});
//
// Block: Work around clipboard HTML formatting.
//