1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-29 20:34:04 +02:00

Update reply-account plugin to fix a search column issue due to a TweetDeck update

This commit is contained in:
chylex 2017-03-16 12:19:39 +01:00
parent 4c59526e39
commit 4de31453fd
2 changed files with 14 additions and 5 deletions
Resources/Plugins/reply-account

View File

@ -8,7 +8,7 @@ Custom reply account
chylex chylex
[version] [version]
1.2 1.2.1
[website] [website]
https://tweetduck.chylex.com https://tweetduck.chylex.com

View File

@ -22,10 +22,19 @@ enabled(){
var section = data.element.closest("section.column"); var section = data.element.closest("section.column");
var column = TD.controller.columnManager.get(section.attr("data-column")); var column = TD.controller.columnManager.get(section.attr("data-column"));
var header = $("h1.column-title", section); var header = $(".column-title", section);
var title = header.children(".column-head-title");
var columnTitle = header.children(".column-head-title").text(); var columnTitle, columnAccount;
var columnAccount = header.children(".attribution").text();
if (title.length){
columnTitle = title.text();
columnAccount = header.children(".attribution").text();
}
else{
columnTitle = header.children(".column-title-edit-box").val();
columnAccount = "";
}
try{ try{
query = configuration.customSelector(column.getColumnType(), columnTitle, columnAccount, column); query = configuration.customSelector(column.getColumnType(), columnTitle, columnAccount, column);
@ -134,4 +143,4 @@ disabled(){
$(document).off("uiInlineComposeTweet", this.uiComposeTweetEvent); $(document).off("uiInlineComposeTweet", this.uiComposeTweetEvent);
$(document).off("uiDockedComposeTweet", this.uiComposeTweetEvent); $(document).off("uiDockedComposeTweet", this.uiComposeTweetEvent);
$(document).off("click", ".js-account-list .js-account-item", this.onSelectedAccountChanged); $(document).off("click", ".js-account-list .js-account-item", this.onSelectedAccountChanged);
} }