Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 96c09d0

Browse files
committed
fix linting errors
1 parent 5d7c0cf commit 96c09d0

File tree

6 files changed

+14
-62862
lines changed

6 files changed

+14
-62862
lines changed

examples/browser-add-file/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<meta charset="UTF-8"/>
55
<title>JS IPFS API - Example - Browser - Add</title>
6-
<script src="scripts/buffer.js"></script> <!-- feross buffer -->
7-
<script src="scripts/ipfs.js"></script> <!-- js-ipfs-api/dist/index.js -->
6+
<script src="https://wzrd.in/standalone/buffer"></script> <!-- feross buffer -->
7+
<script src="https://npmcdn.com/ipfs-api/dist/index.js"></script>
88
<script src="index.js"></script>
99
</head>
1010
<body>

examples/browser-add-file/index.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
'use strict'
2+
13
var ipfs = window.IpfsApi()
24

35
function storeText () {
4-
store(document.getElementById('source').value);
6+
store(document.getElementById('source').value)
57
}
68

79
function storeFile () {
8-
const file = document.getElementById('filePicker').files[0];
9-
const reader = new FileReader();
10-
reader.onload = function() {
11-
store(reader.result);
10+
const file = document.getElementById('filePicker').files[0]
11+
const reader = new FileReader()
12+
reader.onload = function () {
13+
store(reader.result)
1214
};
13-
reader.readAsArrayBuffer(file);
15+
reader.readAsArrayBuffer(file)
1416
}
1517

1618
// from examples/browser-add
@@ -41,7 +43,7 @@ function display (hash) {
4143
})
4244
}
4345

44-
document.addEventListener('DOMContentLoaded', function() {
45-
document.getElementById('storeText').onclick = storeText;
46-
document.getElementById('storeBuffer').onclick = storeFile;
46+
document.addEventListener('DOMContentLoaded', function () {
47+
document.getElementById('storeText').onclick = storeText
48+
document.getElementById('storeBuffer').onclick = storeFile
4749
})

examples/browser-add-file/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "http-server -p 8888"
7+
"start": "http-server -a 127.0.0.1 -p 8888"
88
},
99
"keywords": [],
1010
"author": "nycoliver",

0 commit comments

Comments
 (0)