判断字符串不超过20个字符_如何阻止超过140个字符的推文(如果确实需要)

判断字符串不超过20个字符

判断字符串不超过20个字符

After over a decade of staunchly restricting users to 140 characters in each message, Twitter just flipped the switch and enabled 280 characters in most supported languages. And not everyone is happy.

经过十多年的严格限制,每条消息中的用户只能使用140个字符,Twitter才启用了该开关,并以大多数受支持的语言启用了280个字符 。 并不是每个人都快乐。

Most users seem at least grudgingly accepting of the new dynamic, but if you just can’t stand all these Double Stuff tweets for some reason, here’s how to hide them in your browser.

大多数用户似乎至少会勉强接受新的动态,但是如果由于某种原因您不能忍受所有这些Double Stuff推文,可以通过以下方法将它们隐藏在浏览器中。

在Twitter主页上 (On the Twitter Homepage)

There are already multiple Chrome extensions that will either completely hide 141+ character tweets, or simply truncate them down to the original limit. The best one I’ve found is called 140 Characters Only. When installed and enabled, it simply cuts off any tweet on Twitter’s homepage or embedded tweets that goes for more than 140 characters. Like this:

已经有多个Chrome扩展程序将完全隐藏141个以上的字符推文,或者将其截短至原始限制。 我发现最好的一个叫做“ 140个字符” 。 安装并启用后,它只会截断Twitter主页上的任何推文或嵌入的推文,这些推文的长度超过140个字符。 像这样:

Left: a standard extra-long tweet. Right: the same tweet truncated with 140 Characters Only.
左:标准超长鸣叫。 右:同一条推文仅被截断为140个字符。

If you’d like something a little more flexible, Block280 will collapse 141+ character tweets, showing you the original poster and anyone in the message chain. It’s better for someone who wants to completely ignore all long tweets, but it was made a couple of months before the full switch, and it has some issues. Specifically, it will block any message with a chain or attachments that go beyond the original 140 character limit, including embedded links and images. It’s great if you want to restrict your feed to only short text messages, but limited otherwise.

如果您想要更灵活的东西, Block280将折叠141个以上的字符推文,向您显示原始海报和消息链中的任何人。 对于想要完全忽略所有长条推文的人来说更好,但是它是在完全转换之前几个月提出的,并且存在一些问题。 具体来说,它将阻止任何超过原始140个字符限制的带有链或附件的消息,包括嵌入的链接和图像。 如果您希望将供稿限制为短文本消息,否则将其限制为很好。

At the time of writing Tweets Truncator trims Twitter messages for Firefox users, but there doesn’t appear to be an option for Opera. That may change rather quickly as Twitter users get tired of the Double Stuff life.

在撰写推文时,Truncator会为Firefox用户修剪Twitter消息,但Opera似乎没有选择。 随着Twitter用户对Double Stuff生活的厌倦,这种情况可能会很快改变。

Note that all of these extensions require permission to see everything you view on Twitter.com, but seeing as those are fairly light permissions, we’re comfortable recommending them.

请注意,所有这些扩展都需要权限才能查看您在Twitter.com上查看的所有内容,但是鉴于这些权限相当轻巧,我们很推荐您使用它们。

在TweetDeck (On TweetDeck)

If you prefer TweetDeck for your tweet-reading, the open source third-party extension Better TweetDeck has you covered. It’s available for Chrome, Firefox, and Opera.

如果您更喜欢TweetDeck进行tweet阅读,则可以使用开源第三方扩展程序Better TweetDeck。 它适用于ChromeFirefoxOpera

Download and install it, then go to the extension settings page and click “Content.” Click the check box next to the setting marked “Enable regular expression support in Mute filters.” Click “save” at the top of the page.

下载并安装它,然后转到扩展程序设置页面并单击“内容”。 单击标记为“在静音过滤器中启用正则表达式支持”的设置旁边的复选框。 点击页面顶部的“保存”。

Now go to TweetDeck itself in a new tab. Click the settings gear icon in the lower-left corner, then click “Mute.”

现在在新选项卡中转到TweetDeck本身 。 点击左下角的设置齿轮图标,然后点击“静音”。

Under the “Matching” entry, add this text: ^[^]{141,}$ and click “Mute.”

在“匹配”条目下,添加以下文本: ^ [^] {141,} $ ,然后单击“静音”。

Now every tweet over 140 characters will disappear from all of your TweetDeck columns. Neat, huh? The mute function will appear on all Twitter products, but it will only affect TweetDeck in browsers with the Better TweetDeck extension installed and regular expression support enabled. To reverse this change, just delete the mute filter.

现在,所有超过140个字符的推文都会从所有TweetDeck列中消失。 整洁吧? 静音功能将出现在所有Twitter产品上,但仅会在安装了Better TweetDeck扩展并启用正则表达式支持的浏览器中影响TweetDeck。 要撤消此更改,只需删除静音过滤器。

在移动 (On Mobile)

At the time of this writing, there’s no way to block or truncate longer tweets on Android or iOS apps. Keep an eye on the more active mobile developers, however—it’s likely that such a feature is on their to-do lists.

在撰写本文时,还没有办法阻止或截断Android或iOS应用上的较长推文。 但是,请注意更活跃的移动开发人员 -他们的工作清单上可能有这样的功能。

翻译自: https://www.howtogeek.com/332423/how-to-block-tweets-over-140-characters-if-you-really-must/

判断字符串不超过20个字符

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值