Source Explorer

A helpful widget for viewing the source of a dat site.

dat site | git repo

Usage

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'
})