![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
break-tweet-autolink
Advanced tools
This repository provides a library and tools to remove auto links in tweet text.
Tweet form in https://twitter.com or https://mobile.twitter.com automatically links many things
such as screen names, hashtags, URLs. The library and tools provide the capability to remove these
links programmatically by inserting zero-width space (\u200B
).
Did you experience various stuffs are linked unintentionally? For example,
receiver.foo()
README.md
#include
@foo
and/or global variables $bar
If you experienced and felt it annoying, tools or library provided by this repository would help you.
As the easiest way to access the feature provided by this repository, small web app is hosted on GitHub pages.
This site utilizes navigator.clipboard
for accessing clipboard. When you click the button at first time, your browser will ask your permission.
If your browser does not support navigator.clipboard
, it falls back to <textarea>
. Please paste
your tweet text to the text area and click the button, then cut the text in text area.
This site is implemented here.
If you use the feature frequently, this repository offers a Chrome Extension.
You can easily remove auto links in selected text at twitter.com or mobile.twitter.com. The easiest way is using a context menu item.
It automatically update selected text with unlinked text.
The extension is implemented here. Please read its README.md for more details.
If you're terminal junky and post tweets from command line, this repository even offers a command line tool to remove auto links in tweet text. Node.js is necessary.
To use the tool, install it via npm
$ npm install -g unlink-tweet-cli
$ unlink-tweet --help
Or running the command without installing the npm package thanks to npx
is also supported.
$ npx unlink-tweet-cli --help
Interface of the CLI is
unlink-tweet {text}
or
unlink-tweet [options] -- {text}
{text}
can be multiple arguments. In the case, all arguments are joined with one white space.
And it outputs unlinked text to STDOUT.
The CLI tool is implemented here. Please read its README.md for more details.
npm package is available. It can be used programmatically from JavaScript.
npm install --save break-tweet-autolink
Please import TweetAutoLinkBreaker
class and construct instance with configuration.
const { TweetAutoLinkBreaker } = require('break-tweet-autolink');
const b = new TweetAutoLinkBreaker({
hashtag: true, // Break hashtag links such as #hashtag
urlNoScheme: true, // Break URLs with no scheme such as example.com
urlWithScheme: true, // Break URLs with scheme such as https://example.com
cashtag: true, // Break cashtag links such as $TWTR
mention: true, // Break mentions such as @foo
list: true, // Break list mentions such as @foo/bar
});
const text = 'This #text has $MANY @autolinks please remove it.com';
const unlinked = b.breakAutoLinks(text);
console.log('Unlinked:', text);
The package also contains TypeScript type definitions. Please see index.d.ts
in the
installed package to know APIs.
Library and all tools are distributed under the MIT License.
FAQs
Break auto links in tweet text
The npm package break-tweet-autolink receives a total of 1 weekly downloads. As such, break-tweet-autolink popularity was classified as not popular.
We found that break-tweet-autolink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.