Instantly share code, notes, and snippets.

Embed
What would you like to do?
tweetdeck-limit-override.js
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}});
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The character counter for tweets is accurate at the expense of breaking retweet and DMs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(){return twttr.txt.getTweetLength.apply(this,arguments)-140}});
@daruncool4ever

This comment has been minimized.

Show comment
Hide comment
@daruncool4ever

daruncool4ever Sep 27, 2017

Wow ! Its Osm 👍 Working:-)

daruncool4ever commented Sep 27, 2017

Wow ! Its Osm 👍 Working:-)

@giopunt

This comment has been minimized.

Show comment
Hide comment
@giopunt

giopunt Sep 27, 2017

Nice one!

giopunt commented Sep 27, 2017

Nice one!

@Luclu7

This comment has been minimized.

Show comment
Hide comment
@Luclu7

Luclu7 Sep 27, 2017

Thanks ! o/

Luclu7 commented Sep 27, 2017

Thanks ! o/

@fronbasal

This comment has been minimized.

Show comment
Hide comment
@fronbasal

fronbasal Sep 27, 2017

Thanks, m8 :)

fronbasal commented Sep 27, 2017

Thanks, m8 :)

@superagetrox

This comment has been minimized.

Show comment
Hide comment
@superagetrox

superagetrox commented Sep 27, 2017

nice

@alkihis

This comment has been minimized.

Show comment
Hide comment
@alkihis

alkihis Sep 27, 2017

Working, but broke RTs
Thanks :)

alkihis commented Sep 27, 2017

Working, but broke RTs
Thanks :)

@GL1TCH04

This comment has been minimized.

Show comment
Hide comment
@GL1TCH04

GL1TCH04 Sep 27, 2017

how do i use this

GL1TCH04 commented Sep 27, 2017

how do i use this

@erydactyl

This comment has been minimized.

Show comment
Hide comment
@erydactyl

erydactyl Sep 27, 2017

I'm not really that knowledgeable with JS but had a go at putting it into a UserScript form here: https://gist.github.com/erydactyl/8ac7fe290a5ea72706cc1b77d15163d9

erydactyl commented Sep 27, 2017

I'm not really that knowledgeable with JS but had a go at putting it into a UserScript form here: https://gist.github.com/erydactyl/8ac7fe290a5ea72706cc1b77d15163d9

@MehediH

This comment has been minimized.

Show comment
Hide comment
@MehediH

MehediH Sep 27, 2017

This breaks RTs and DMs

MehediH commented Sep 27, 2017

This breaks RTs and DMs

@Zhangsun321

This comment has been minimized.

Show comment
Hide comment
@Zhangsun321

Zhangsun321 Sep 28, 2017

still doesnt retweet for me..
it lets me quote a tweet and add text

Zhangsun321 commented Sep 28, 2017

still doesnt retweet for me..
it lets me quote a tweet and add text

@TheLastZombie

This comment has been minimized.

Show comment
Hide comment
@TheLastZombie

TheLastZombie Sep 28, 2017

Most minor issue ever: Post button is disabled when the tweet is exactly 140 characters long.

Edit: Screenshot
screenshot-tweetdeck twitter com-2017-09-28-10-49-06-136

TheLastZombie commented Sep 28, 2017

Most minor issue ever: Post button is disabled when the tweet is exactly 140 characters long.

Edit: Screenshot
screenshot-tweetdeck twitter com-2017-09-28-10-49-06-136

@jeremy6d

This comment has been minimized.

Show comment
Hide comment
@jeremy6d

jeremy6d Sep 28, 2017

Looks like this will not work for scheduling tweets ahead of time. Thanks for sharing!

jeremy6d commented Sep 28, 2017

Looks like this will not work for scheduling tweets ahead of time. Thanks for sharing!

@erisdev

This comment has been minimized.

Show comment
Hide comment
@erisdev

erisdev Sep 28, 2017

why's it minified? it made me kinda suspicious at first

(i de-minified it and it does what it says at least)

erisdev commented Sep 28, 2017

why's it minified? it made me kinda suspicious at first

(i de-minified it and it does what it says at least)

@zimpirate

This comment has been minimized.

Show comment
Hide comment
@zimpirate

zimpirate Oct 3, 2017

Are the RTs and DMs still broken?

zimpirate commented Oct 3, 2017

Are the RTs and DMs still broken?

@Zhangsun321

This comment has been minimized.

Show comment
Hide comment
@Zhangsun321

Zhangsun321 Oct 3, 2017

To get RT's and DM's to work.. use this script instead
https://twitter.com/MagickalFeline/status/913532330509135872

Zhangsun321 commented Oct 3, 2017

To get RT's and DM's to work.. use this script instead
https://twitter.com/MagickalFeline/status/913532330509135872

@dantasjadson

This comment has been minimized.

Show comment
Hide comment
@dantasjadson

dantasjadson Oct 3, 2017

Thanks a lot! It works perfectly!

dantasjadson commented Oct 3, 2017

Thanks a lot! It works perfectly!

@roipoussiere

This comment has been minimized.

Show comment
Hide comment
@roipoussiere

roipoussiere Oct 3, 2017

Is is possible to golf this script to put it in 280 characters? :D
Thank you a lot btw, works like a charm.

roipoussiere commented Oct 3, 2017

Is is possible to golf this script to put it in 280 characters? :D
Thank you a lot btw, works like a charm.

@KayJay89

This comment has been minimized.

Show comment
Hide comment
@KayJay89

KayJay89 Oct 5, 2017

This is no longer working as far as I can tell.

KayJay89 commented Oct 5, 2017

This is no longer working as far as I can tell.

@Icesnap

This comment has been minimized.

Show comment
Hide comment
@Icesnap

Icesnap Oct 5, 2017

It stopped working for me too.

Did Twitter concluded their 280 characters test ?

Icesnap commented Oct 5, 2017

It stopped working for me too.

Did Twitter concluded their 280 characters test ?

@yersonperez

This comment has been minimized.

Show comment
Hide comment
@yersonperez

yersonperez Oct 6, 2017

Is not working.

yersonperez commented Oct 6, 2017

Is not working.

@Panchistiko

This comment has been minimized.

Show comment
Hide comment
@Panchistiko

Panchistiko Oct 6, 2017

This was working two days ago, but it doesn't work anymore.
Too sad.

Panchistiko commented Oct 6, 2017

This was working two days ago, but it doesn't work anymore.
Too sad.

@makc

This comment has been minimized.

Show comment
Hide comment
@makc

makc Oct 7, 2017

Yep, not any more. Too bad, just when I actually needed more characters.

makc commented Oct 7, 2017

Yep, not any more. Too bad, just when I actually needed more characters.

@TheFranquiz

This comment has been minimized.

Show comment
Hide comment
@TheFranquiz

TheFranquiz Oct 16, 2017

It now displays: net::ERR_BLOCKED_BY_CLIENT :(

TheFranquiz commented Oct 16, 2017

It now displays: net::ERR_BLOCKED_BY_CLIENT :(

@AliAmini

This comment has been minimized.

Show comment
Hide comment
@AliAmini

AliAmini Nov 4, 2017

Please check the snippet again. It throw an error:

Uncaught ReferenceError: twttr is not defined
    at <anonymous>:6:27

AliAmini commented Nov 4, 2017

Please check the snippet again. It throw an error:

Uncaught ReferenceError: twttr is not defined
    at <anonymous>:6:27
@Knight1

This comment has been minimized.

Show comment
Hide comment
@Knight1

Knight1 Nov 5, 2017

Same error as @AliAmini here :(

Knight1 commented Nov 5, 2017

Same error as @AliAmini here :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment