Tweet Cramming

Allow 280 characters in a Tweet sent from TweetDeck automatically

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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;
	}
});