Tweet Cramming

Allow 280 characters in a Tweet sent from TweetDeck automatically

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Tweet Cramming
// @namespace    guebosch
// @version      2024-07-14
// @description  Allow 280 characters in a Tweet sent from TweetDeck automatically
// @author       guebosch, Nikolay Kolev
// @run-at       document-idle
// @match          https://tweetdeck.twitter.com/*
// @match          https://x.com/*
// @license MIT
// ==/UserScript==

TD.services.TwitterClient.prototype.makeTwitterCall = function(
	b,
	e,
	f,
	g,
	c,
	d,
	h
) {
	c = c || function() {};
	d = d || function() {};
	var i =
		b == "https://api.twitter.com/1.1/statuses/update.json"
			? Object.assign(e, { weighted_character_count: !0 })
			: e;
	b = this.request(b, { method: f, params: i, 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() {
		var l = twttr.txt.getTweetLength.apply(this, arguments);
		return l > 140 ? l - 140 : l;
	}
});