twi-ext v0.12.0
twi-ext
Unofficial utility to develop browser extensions for Twitter / X.
This package provides a simple API to interact with the Twitter web interface. It allows you to listen to events such as new tweets being added to the timeline, and provides access to the React props of the tweets or user profiles.
It is used to develop Shadowban Scanner, a browser extension that helps you detect shadowbans on Twitter, and other extensions.
!IMPORTANT This utility works only within page scripts. Running it within a content script may result in an error.
!WARNING This package is under development and some features are not yet implemented.
Installation
npm install twi-extUsage
import { Timeline, Tweet } from "twi-ext";
const onNewTweet = (tweet: Tweet): void => {
// Get the tweet element.
const tweetElement = tweet.element;
// Get the React props of the tweet.
const props = tweet.props;
};
const timeline = new Timeline();
timeline.onNewTweet((tweet) => {
// Do something when a new tweet is added to the timeline.
onNewTweet(tweet);
});See the documentation for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Development
npm installBuild
To build the project and generate the documentation:
npm run buildFormat
To format the code:
npm run formatLint
To lint the code:
npm run lintPull Requests
This repository uses Changesets to manage versioning and releases. When creating a pull request, please run the Changesets CLI and commit the changeset file.
npx changeset1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago