mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 10:32:10 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1d78bd2655 | |||
9250f1907c |
@@ -20,7 +20,7 @@ namespace TweetDuck{
|
|||||||
public const string BrandName = "TweetDuck";
|
public const string BrandName = "TweetDuck";
|
||||||
public const string Website = "https://tweetduck.chylex.com";
|
public const string Website = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
public const string VersionTag = "1.13.4";
|
public const string VersionTag = "1.13.4.1";
|
||||||
|
|
||||||
public static readonly bool IsPortable = File.Exists("makeportable");
|
public static readonly bool IsPortable = File.Exists("makeportable");
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ Clear columns
|
|||||||
chylex
|
chylex
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
1.2
|
1.2.1
|
||||||
|
|
||||||
[website]
|
[website]
|
||||||
https://tweetduck.chylex.com
|
https://tweetduck.chylex.com
|
||||||
|
@@ -7,17 +7,12 @@ constructor(){
|
|||||||
enabled(){
|
enabled(){
|
||||||
// prepare variables and functions
|
// prepare variables and functions
|
||||||
var clearColumn = (columnName) => {
|
var clearColumn = (columnName) => {
|
||||||
let col = TD.controller.columnManager.get(columnName);
|
TD.controller.columnManager.get(columnName).clear();
|
||||||
return if !col.isClearable();
|
|
||||||
|
|
||||||
col.clear();
|
|
||||||
TD.controller.stats.columnActionClick("clear");
|
TD.controller.stats.columnActionClick("clear");
|
||||||
};
|
};
|
||||||
|
|
||||||
var resetColumn = (columnName) => {
|
var resetColumn = (columnName) => {
|
||||||
let col = TD.controller.columnManager.get(columnName);
|
let col = TD.controller.columnManager.get(columnName);
|
||||||
return if !col.isClearable();
|
|
||||||
|
|
||||||
col.model.setClearedTimestamp(0);
|
col.model.setClearedTimestamp(0);
|
||||||
col.reloadTweets();
|
col.reloadTweets();
|
||||||
};
|
};
|
||||||
|
@@ -40,7 +40,7 @@ enabled(){
|
|||||||
columnAccount = "";
|
columnAccount = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{ // TODO isOfType is removed
|
||||||
query = configuration.customSelector(columnTitle, columnAccount, column, section.hasClass("column-temp"));
|
query = configuration.customSelector(columnTitle, columnAccount, column, section.hasClass("column-temp"));
|
||||||
}catch(e){
|
}catch(e){
|
||||||
$TD.alert("warning", "Plugin reply-account has invalid configuration: customSelector threw an error: "+e.message);
|
$TD.alert("warning", "Plugin reply-account has invalid configuration: customSelector threw an error: "+e.message);
|
||||||
|
@@ -25,26 +25,23 @@
|
|||||||
const app = $(document.body).children(".js-app");
|
const app = $(document.body).children(".js-app");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Constant: Column types mapped to their titles.
|
// Constant: Column icon classes mapped to their titles.
|
||||||
//
|
//
|
||||||
const columnTypes = {
|
const columnTitles = {
|
||||||
"col_home": "Home",
|
"icon-home": "Home",
|
||||||
"col_timeline" : "Home",
|
"icon-mention": "Mentions",
|
||||||
"col_mentions": "Mentions",
|
"icon-message": "Messages",
|
||||||
"col_me": "Mentions",
|
"icon-notifications": "Notifications",
|
||||||
"col_inbox": "Messages",
|
"icon-follow": "Followers",
|
||||||
"col_messages": "Messages",
|
"icon-activity": "Activity",
|
||||||
"col_interactions": "Notifications",
|
"icon-favorite": "Likes",
|
||||||
"col_followers": "Followers",
|
"icon-user": "User",
|
||||||
"col_activity": "Activity",
|
"icon-search": "Search",
|
||||||
"col_favorites": "Likes",
|
"icon-list": "List",
|
||||||
"col_usertweets": "User",
|
"icon-custom-timeline": "Timeline",
|
||||||
"col_search": "Search",
|
"icon-dataminr": "Dataminr",
|
||||||
"col_list": "List",
|
"icon-play-video": "Live video",
|
||||||
"col_customtimeline": "Timeline",
|
"icon-schedule": "Scheduled"
|
||||||
"col_dataminr": "Dataminr",
|
|
||||||
"col_livevideo": "Live video",
|
|
||||||
"col_scheduled": "Scheduled"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -99,10 +96,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Function: Retrieves column name
|
// Function: Attempts to retrieve the column icon class. Returns undefined on failure.
|
||||||
|
//
|
||||||
|
const getColumnIconClass = function(column){
|
||||||
|
if (ensurePropertyExists(column, "ui", "_$chirpContainer")){
|
||||||
|
return column.ui._$chirpContainer.closest(".js-column").attr("data-td-icon");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Function: Retrieves column name and caches it.
|
||||||
|
//
|
||||||
const getColumnName = function(column){
|
const getColumnName = function(column){
|
||||||
let cached = column._tduck_type || (column._tduck_type = Object.keys(columnTypes).find(type => column.isOfType(type)));
|
let cached = column._tduck_icon || (column._tduck_icon = getColumnIconClass(column));
|
||||||
return columnTypes[cached] || "";
|
return columnTitles[cached] || "";
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user