Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oldweb-today/shepherd-client


https://github.com/oldweb-today/shepherd-client

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# shepherd-client

This modules provides the client side scripts necessary to run the new Webrecorder/oldweb-today browser system.

### Usage

To use the default setup, simply include the prebuilt [shepherd-client.bundle.js](dist/shepherd-client.bundle.js) and call `InitBrowserDefault()` function

This will initialize a remote browser on page load.

A basic setup might look as follows:

```html




InitBrowserDefault("{{ reqid }}", {"id": "browser"});




```

The `reqid` is an id of a requested browser from shepherd. It can be passed in from a server (the default)
or created dynamically using the Shepherd API.

*TODO: add more docs on how to use!*

### Building

To build the bundle (requires Node), run:

```bash
yarn install
yarn run build
```

(To build debug-friendly bundle run `yarn run build-dev`)

### Importing Module

To embed a remote/containerized browser into an existing application,
you can import the node module and use the CBrowser class:

```
import CBrowser from 'shepherd-client/src/browser';
...
let cb = new CBrowser(...)
```