Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/browser-add-readable-stream/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* global Ipfs */
/* eslint-env browser */

const repoPath = 'ipfs-' + Math.random()
const repoPath = `ipfs-${Math.random()}`
const ipfs = new Ipfs({ repo: repoPath })

ipfs.on('ready', () => {
Expand Down
3 changes: 1 addition & 2 deletions examples/browser-browserify/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
</head>
<body>
<h1>JS IPFS - Add data to IPFS from the browser</h1>
<textarea id="source">
</textarea>
<textarea id="source"></textarea>
<button id="store">add to ipfs</button>
<div>
<div>found in ipfs:</div>
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-browserify/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict'

var IPFS = require('ipfs')
const IPFS = require('ipfs')

const node = new IPFS({ repo: String(Math.random() + Date.now()) })

node.once('ready', () => console.log('IPFS node is ready'))

function store () {
var toStore = document.getElementById('source').value
const toStore = document.getElementById('source').value

node.files.add(Buffer.from(toStore), (err, res) => {
if (err || !res) {
Expand Down