Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lafkpages/replit-ext-helper
A helper utility for browser extensions and userscripts.
https://github.com/lafkpages/replit-ext-helper
browser-extension helper replit userscript utility
Last synced: 1 day ago
JSON representation
A helper utility for browser extensions and userscripts.
- Host: GitHub
- URL: https://github.com/lafkpages/replit-ext-helper
- Owner: lafkpages
- Created: 2023-09-18T08:43:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-01T09:38:08.000Z (about 1 year ago)
- Last Synced: 2024-11-10T16:44:39.359Z (about 2 months ago)
- Topics: browser-extension, helper, replit, userscript, utility
- Language: TypeScript
- Homepage:
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![codecov](https://codecov.io/gh/lafkpages/replit-ext-helper/graph/badge.svg?token=W1708PX42X)](https://codecov.io/gh/lafkpages/replit-ext-helper)
# Replit extensions helper
A helper utility for browser extensions and userscripts.
Note: not for [Replit extensions](https://docs.replit.com/extensions).
## API
A global `replitExtHelper` object is exposed. It's an object with the following properties.
It also extends `EventTarget` so you can listen to events on it.Note that it may have more properties than listed here, but those are not part of the public API.
```ts
export class ReplitExtHelper extends EventTarget {
debug: boolean;get isDesktop(): boolean;
set isDesktop(value: true | null);replitSvelteComponents: Record<
Exclude,
any
>;injectReplitSvelteStyles(): void;
getElement(query: string): Element | null;
getElements(query: string): Element[];
waitForElement(query: string): Promise;get routeContainerElm(): HTMLDivElement;
}
```