Skip to content

wbyoko/tweetdeck-clear-column

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tweetdeck-clear-column

Clear Column for tweetdeck mac

replace these two files in the htdocs/web

  • mustaches/mustaches.*.js
  • scripts/swift/app/main.*.js

And the clear column action will appear in the title bar.

It doesn't override the 'mark all as read' action on messages, so on that column you will still need to open the column.

Otherwise, it uses the 'mark all as read' icon for the clear action.

wbyoko

How to

  1. install js-beautify globaly

    npm -g install js-beautify

  2. go to web directory

    cd /Applications/TweetDeck.app/Contents/Resources/htdocs/web

  3. pretty print templates and main js

    cd scripts/swift/app/

    sudo chmod 777 main.*

    js-beautify -r main.*

    cd ../../../mustaches/

this.TD_mustaches/g' mustaches.*```

  1. add isClearable and hasHeaderActions to templates / js

this.TD_mustaches["column/column_header.mustache"]= '

' + ' {{^isTemporary}} {{/isTemporary}} ' + ' ' + ' {{#isTemporary}} {{/isTemporary}} ' + ' {{^isTemporary}} {{/isTemporary}} ' + ' {{^withEditableTitle}}

{{{columntitle}}}

{{/withEditableTitle}} ' + ' {{#withEditableTitle}}
{{{columntitle}}}
{{/withEditableTitle}} ' + ' {{#withDMComposeButton}} {{/withDMComposeButton}} ' + ' {{#withMarkAllRead}} {{/withMarkAllRead}} ' + ' {{#isClearable}} {{/isClearable}} ' + ' {{^isTemporary}} {{/isTemporary}} ' + '', ```

  1. Add javascript to main.js file.

###Search Keys

  • 'handleMarkAllRead'

add these lines to the action function variables

                
        }, this.handleColumnClear = function() {
            this.column.clear(), this.trigger("uiClearColumnAction", {
                columnId: this.column.model.getKey()
            });

add these lines to the event registration protion

 , this.on("uiColumnClearAction", this.handleColumnClear)
  • 'mark-all-read'

add these lines to the action switch

                    case "clear":
                        s.trigger("uiColumnClearAction", {
                            columnKey: n
                        });
                        break;
  • 'column/column_header'

add these lines to the template variables object

                        hasHeaderAction: hA,
                        isClearable: iC,

add these lines to the end of the javascript right before the template variable object. you have to find out the column parameter is mCol = ?. look for isMessageColumn() method call a line up and find the object.

                        var mCol = ?,
                        cMes = mCol.isMessageColumn(), 
                        iC = !cMes && mCol.isClearable(),
                        hA = cMes || iC;

About

Clear Column for tweetdeck for mac versions < 3.9.x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published