twi-ext v0.8.1
twi-ext
Unofficial utility to develop browser extensions for Twitter / X.
!IMPORTANT This utility works only within page scripts. Running it within a content script may result in an error.
Installation
npm install twi-ext
Usage
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 install
Build
To build the project and generate the documentation:
npm run build
Format
To format the code:
npm run format
Lint
To lint the code:
npm run lint
Pull 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 changeset
13 days ago
15 days ago
15 days ago
15 days ago
15 days ago
15 days ago
17 days ago
18 days ago
17 days ago
18 days ago
22 days ago
23 days ago
23 days ago
23 days ago
24 days ago
24 days ago
24 days ago
24 days ago
24 days ago