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

Commit e6be4bc

Browse files
committed
update ipfs manifest
1 parent 903dee8 commit e6be4bc

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

app/extensions.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,24 +248,32 @@ let generateIPFSManifest = () => {
248248
}
249249

250250
return {
251-
name: 'IPFS Viewer',
252-
description: l10n.translation('ipfsDesc'),
251+
// https://developer.chrome.com/extensions/manifest
252+
// Required
253253
manifest_version: 2,
254-
version: '1.0',
254+
name: 'IPFS',
255+
version: '0.1.0',
256+
// Recommended
257+
default_locale: 'en',
258+
description: l10n.translation('ipfsDesc'),
259+
icons: {
260+
128: 'img/ipfs-128.png',
261+
48: 'img/ipfs-48.png',
262+
16: 'img/ipfs-16.png'
263+
},
264+
// Other
265+
background: {
266+
scripts: [ 'gen/ipfs.entry.js' ]
267+
},
255268
content_security_policy: concatCSP(cspDirectives),
256269
content_scripts: [],
257270
permissions: ['externally_connectable.all_urls', 'tabs', '<all_urls>'],
258271
externally_connectable: {
259272
matches: ['<all_urls>']
260273
},
261-
icons: {
262-
128: 'img/ipfs-128.png',
263-
48: 'img/ipfs-48.png',
264-
16: 'img/ipfs-16.png'
265-
},
266-
incognito: 'split',
267-
// TODO(diasdavid) How to get this key??
268-
key: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyWl+wMvL0wZX3JUs7GeZAvxMP+LWEh2bwMV1HyuBra/lGZIq3Fmh0+AFnvFPXz1NpQkbLS3QWyqhdIn/lepGwuc2ma0glPzzmieqwctUurMGSGManApGO1MkcbSPhb+R1mx8tMam5+wbme4WoW37PI3oATgOs2NvHYuP60qol3U7b/zB3IWuqtwtqKe2Q1xY17btvPuz148ygWWIHneedt0jwfr6Zp+CSLARB9Heq/jqGXV4dPSVZ5ebBHLQ452iZkHxS6fm4Z+IxjKdYs3HNj/s8xbfEZ2ydnArGdJ0lpSK9jkDGYyUBugq5Qp3FH6zV89WqBvoV1dqUmL9gxbHsQIDAQAB'
274+
incognito: 'split'
275+
// https://developer.chrome.com/apps/manifest/key
276+
// key: ''
269277
}
270278
}
271279

js/ipfs/entry.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
// const ipc = window.chrome.ipcRenderer
22

33
console.log('woot! managed to capture the ipfs:// or dweb:// protocols')
4+
5+
chrome.protocol.registerStringProtocol('ipfs', (request, callback) => {
6+
callback('hi there!') // eslint-disable-line
7+
})

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ var webtorrentPage = {
161161
}
162162
}
163163

164-
var ipfsPage = {
164+
var ipfs = {
165165
name: 'ipfs',
166166
target: 'web',
167167
entry: ['./js/ipfs/entry.js'],
@@ -177,5 +177,5 @@ module.exports = [
177177
merge(app, envConfig()),
178178
merge(devTools, envConfig()),
179179
merge(webtorrentPage, envConfig()),
180-
merge(ipfsPage, envConfig())
180+
merge(ipfs, envConfig())
181181
]

0 commit comments

Comments
 (0)