A helpful widget for viewing the source of a dat site.
MIT License
A helpful widget for viewing the source of a dat site.
dat://source-explorer.hashbase.io
Import the CSS and Javascript into your site. In your HTML:
<link rel="stylesheet" href="dat://source-explorer.hashbase.io/explorer.css">
In your Javascript:
import * as explorer from 'dat://source-explorer.hashbase.io/explorer.js'
explorer.setup(document.body, {
url: window.location.toString(), // defaults to window.location
folder: '/', // defaults to '/'
file: 'index.html' // defaults to 'index.html'
})