Skip to content

Commit

Permalink
fix(browserAction): switch to Buffer bundled with ipfs-api
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Feb 26, 2017
1 parent 13d1921 commit d4e6e7b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion add-on/src/popup/quick-upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<input type="file" id="quickUploadInput" />
</p>
<script src="../lib/data-i18n.js"></script>
<script src="../lib/npm/buffer.js"></script>
<script src="../lib/npm/ipfs-api.min.js"></script>
<script src="quick-upload.js"></script>
</body>

Expand Down
3 changes: 1 addition & 2 deletions add-on/src/popup/quick-upload.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'
/* eslint-env browser, webextensions */

const Buffer = window.Buffer.Buffer // workaround for https://github.com/ipfs/js-ipfs-api/issues/528
const Buffer = window.IpfsApi().Buffer
const quickUploadInput = document.getElementById('quickUploadInput')
const quickUploadMessage = document.getElementById('quickUploadMessage')

Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"build": "run-s clean build:*",
"build:copy-is-ipfs-lib": "shx cp node_modules/is-ipfs/dist/index.min.js add-on/src/lib/npm/is-ipfs.min.js",
"build:copy-ipfs-api-lib": "shx cp node_modules/ipfs-api/dist/index.min.js add-on/src/lib/npm/ipfs-api.min.js",
"build:copy-buffer-lib": "browserify -t brfs -r buffer -s Buffer -o add-on/src/lib/npm/buffer.js",
"build:copy-lru-map-lib": "shx cp node_modules/lru_map/lru.js add-on/src/lib/npm/lru.js",
"build:bundle-extension": "web-ext build -s add-on/ -a build/",
"test": "run-s test:*",
Expand All @@ -35,7 +34,6 @@
]
},
"devDependencies": {
"browserify": "14.1.0",
"chai": "3.5.0",
"cross-env": "3.1.4",
"fakefile": "0.0.8",
Expand Down Expand Up @@ -65,7 +63,6 @@
"dependencies": {
"ipfs-api": "12.1.7",
"is-ipfs": "0.3.0",
"buffer": "5.0.5",
"lru_map": "0.3.2"
}
}

0 comments on commit d4e6e7b

Please sign in to comment.