Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oldweb-today/shepherd-client
https://github.com/oldweb-today/shepherd-client
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/oldweb-today/shepherd-client
- Owner: oldweb-today
- License: apache-2.0
- Created: 2018-10-31T20:20:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T12:36:56.000Z (almost 2 years ago)
- Last Synced: 2024-06-29T09:33:48.469Z (3 months ago)
- Language: JavaScript
- Size: 3.48 MB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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(...)
```