Skip to content

Instantly share code, notes, and snippets.

@CollinChaffin
Last active January 27, 2018 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CollinChaffin/12e92e2e4c7d3fc6994855fe29eb1ff8 to your computer and use it in GitHub Desktop.
Save CollinChaffin/12e92e2e4c7d3fc6994855fe29eb1ff8 to your computer and use it in GitHub Desktop.
Tweetdeck 280 Character Unlocker

Tweetdeck 280 Character Unlocker

Automatically and instantly unlock the new full 280 character Tweet length limit in the tweetdeck.twitter.com interface.

Author:         Collin Chaffin
Version:        1.0
Site:           https://tweetdeck.twitter.com

Changelog:
    v 1.0	:	10-01-2017	:	Initial release

Installation Instructions

Chrome

Install Tampermonkey Chrome Extension

Navigate to the Chrome web store and install the Tampermonkey extension here:

Firefox

Install Greasemonkey Firefox Extension

Navigate to the Firefox web store and install the Tampermonkey extension here:

Install Script

Navigate to the direct link of this script and you will be automatically prompted by Tampermonkey/Greasemonkey to install and enable the script.

The script is only activated on one site (tweetdeck.twitter.com) and requires no additional special rights be granted. As always, you should review the script source code if you have any questions/concerns before enabling.

I have also created an additional short link which directly links to the above script:

Tweet!

To utilize the new 280 length, you must utilize the "Tweetdeck" function in Twitter. If you are not already utilizing the Tweetdeck, regardless of this script, I am certain once you begin using it you will ask yourself how you survived without it.

You will find the official Twitter Tweetdeck web interface here:

And click the "New Tweet" button in the upper-left corner to open the Tweet pane. Here is where you will see with the script installed that the full 280 character limit is now active, and will continue to function with active character counter as you type your Tweets. 👍


Screenshots

And here is a screen capture comparison showing the before and after of the change made by the script:


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

// ==UserScript==
// @name Tweetdeck 280 Character Unlocker
// @namespace https://twitter.com/collinchaffin
// @version 1.0
// @description Unlock the full 280 characters for Tweets sent from TweetDeck
// @author Collin Chaffin
// @run-at document-idle
// @match https://tweetdeck.twitter.com/*
// @grant none
// ==/UserScript==
// =======================================================================//
//
// Author: Collin Chaffin
// Last Modified: 10-01-2017 10:00AM
// Filename: Tweetdeck-280-Character-Unlocker.user.js
//
//
// Changelog:
//
// v 1.0 : 10-01-2017 : Initial release
//
// Notes:
//
// Credit to Zemnmez, Erydactyl & others for contributing to the code/methods
//
// Summary:
//
// This module unlocks the full 280 characters for Tweets sent from TweetDeck
//
//
// Instructions:
//
// Install with Greasemonkey/Tampermonkey. Note that grant:NONE is set and
// absolutely no extra permissions are needed.
//
// Once tweetdeck page loads, compose a tweet as usual by clicking
// the "Tweet" button and you should now see "280" at the bottom of
// the Tweet text box indicating you have unlocked the full 280
// characters. This will NOT require any splitting. :)
//
// *NOTE: Twitter maye decide to disable this ability as they already
// have on Twitter.com!
//
// =======================================================================//
/** @type {boolean} */
var stopcondition = false;
/** @type {number} */
interval = setInterval(function() {
if (stopcondition === false) {
if (/New Tweet/i.test(document.body.innerHTML)) {
/**
* @param {?} req
* @param {?} request
* @param {string} new_method
* @param {?} processor
* @param {(Function|null)} onError
* @param {(Function|null)} cb
* @param {?} dataAndEvents
* @return {?}
*/
TD.services.TwitterClient.prototype.makeTwitterCall = function(req, request, new_method, processor, onError, cb, dataAndEvents) {
/** @type {Function} */
onError = onError || function() {
};
/** @type {Function} */
cb = cb || function() {
};
req = this.request(req, {
method : new_method,
params : Object.assign(request, {
weighted_character_count : true
}),
processor : processor,
feedType : dataAndEvents
});
return req.addCallbacks(function(event) {
onError(event.data);
}, function(data) {
cb(data.req, "", data.msg, data.req.errors);
}), req;
};
twttrTxt = Object.assign({}, twttr.txt, {
/**
* @return error
*/
isInvalidTweet : function() {
return false;
},
/**
* @return corrected char count
*/
getTweetLength : function() {
return twttr.txt.getTweetLength.apply(this, arguments) - 140;
}
});
/** @type {boolean} */
stopcondition = true;
}
}
}, 500);
@sturmen
Copy link

sturmen commented Oct 5, 2017

I think Twitter has shut this down. 😢

@tolik518
Copy link

tolik518 commented Oct 5, 2017

Yeah, looks like they check with server now so the scripts won't work

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