Skip to content

A helper utility for browser extensions and userscripts.

Notifications You must be signed in to change notification settings

lafkpages/replit-ext-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codecov

Replit extensions helper

A helper utility for browser extensions and userscripts.

Note: not for Replit 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.

export class ReplitExtHelper extends EventTarget {
  debug: boolean;

  get isDesktop(): boolean;
  set isDesktop(value: true | null);

  replitSvelteComponents: Record<
    Exclude<ReplitSvelteComponents, "DocsProp">,
    any
  >;

  injectReplitSvelteStyles(): void;

  getElement(query: string): Element | null;
  getElements(query: string): Element[];
  waitForElement(query: string): Promise<Element>;

  get routeContainerElm(): HTMLDivElement;
}

About

A helper utility for browser extensions and userscripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published