mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 00:15:48 +02:00
Add additional functionality to the back mouse button (inline and drawer composer, fix order)
This commit is contained in:
parent
fde984d02b
commit
0c9ab32f37
@ -378,13 +378,19 @@
|
||||
//
|
||||
window.TDGF_onMouseClickExtra = function(button){
|
||||
if (button === 1){ // back button
|
||||
var modal = $("#open-modal");
|
||||
var inlineComposer, drawerComposer, modal;
|
||||
|
||||
if (highlightedColumnEle && highlightedColumnEle.closest(".js-column").is(".is-shifted-1")){
|
||||
if ((modal = $("#open-modal")).is(":visible")){
|
||||
modal.find("a[rel=dismiss]").click();
|
||||
}
|
||||
else if ((inlineComposer = $(".js-inline-compose-close")).length === 1){
|
||||
inlineComposer.click();
|
||||
}
|
||||
else if (highlightedColumnEle && highlightedColumnEle.closest(".js-column").is(".is-shifted-1")){
|
||||
highlightedColumnEle.find(".js-column-back").first().click();
|
||||
}
|
||||
else if (modal.is(":visible")){
|
||||
modal.find("a[rel=dismiss]").click();
|
||||
else if ((drawerComposer = $(".js-app-content.is-open .js-drawer-close:visible")).length === 1){
|
||||
drawerComposer.click();
|
||||
}
|
||||
else{
|
||||
$(".js-column-back").click();
|
||||
|
Loading…
Reference in New Issue
Block a user