Skip to content

Commit

Permalink
cosmetic fixes before merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Dec 12, 2017
1 parent 84b2ada commit a0c38aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions add-on/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"description": "Label for an external IPFS node"
},
"panel_headerIpfsNodeExternalTitle": {
"message": "Connect to an IPFS node over http",
"message": "Connect to an IPFS node over HTTP",
"description": "Label for an external IPFS node"
},
"panel_statusGatewayAddress": {
Expand All @@ -36,7 +36,7 @@
"description": "A label in Node status section of Browser Action pop-up"
},
"panel_statusSwarmPeersTitle": {
"message": "The number of other ipfs nodes you can connect to",
"message": "The number of other IPFS nodes you can connect to",
"description": "A label tool-tip in Node status section of Browser Action pop-up"
},
"panel_quickUpload": {
Expand Down Expand Up @@ -161,7 +161,7 @@
"description": "An option title on the Preferences screen"
},
"option_ipfsNodeType_description": {
"message": "External: Connect to an IPFS daemon over http. \n\n Embedded: Run an IPFS node in your browser via ipfs-js *Experimental*",
"message": "External: Connect to an IPFS daemon over HTTP. \n\n Embedded: Run an IPFS node in your browser via ipfs-js *Experimental*",
"description": "An option description on the Preferences screen"
},
"option_ipfsNodeType_external": {
Expand Down
3 changes: 2 additions & 1 deletion add-on/src/lib/ipfs-companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ module.exports = async function init () {
browser.tabs.onActivated.addListener(onActivatedTab)
browser.runtime.onMessage.addListener(onRuntimeMessage)
browser.runtime.onConnect.addListener(onRuntimeConnect)
// browser.protocol exists only in Brave
if (browser.protocol && browser.protocol.registerStringProtocol) {
console.log(`[ipfs-companion] registerStringProtocol available. Adding ipfs:// handler`)
browser.protocol.registerStringProtocol('ipfs', createIpfsUrlProtocolHandler(() => ipfs))
} else {
console.log(`[ipfs-companion] registerStringProtocol not available`, browser.protocol)
console.log(`[ipfs-companion] registerStringProtocol not available, native protocol will not be registered`, browser.protocol)
}
}

Expand Down
2 changes: 1 addition & 1 deletion add-on/src/lib/mime-sniff.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isSvg = require('is-svg')
const mime = require('mime-types')

/*
* A quikc, best effort mime sniffing fn, via:
* A quick, best effort mime sniffing fn, via:
* @see https://github.com/sindresorhus/file-type
* @see https://github.com/sindresorhus/is-svg
* @see https://github.com/bitinn/doc-sniff
Expand Down

0 comments on commit a0c38aa

Please sign in to comment.