Skip to content

Commit

Permalink
chore: cleanup mentions of window.ipfs
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Nov 21, 2022
1 parent c99ad58 commit 6dc3488
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 121 deletions.
6 changes: 3 additions & 3 deletions PRIVACY-POLICY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# **IPFS Companion Privacy Policy**

<em>First Posted: 2019-02-15<br/>
Last Update: 2020-06-20</em> ([change history](https://github.com/ipfs-shipyard/ipfs-companion/commits/master/PRIVACY-POLICY.md))
Last Update: 2021-11-21</em> ([change history](https://github.com/ipfs-shipyard/ipfs-companion/commits/master/PRIVACY-POLICY.md))

The IPFS Companion browser extension is owned by Protocol Labs Inc. and created
by the IPFS Project. We know you care about how your personal data is used and
Expand Down Expand Up @@ -55,7 +55,7 @@ hosted by Protocol Labs and some of your Personal Information, such as public
key and IP address of your IPFS node will be stored on the IPFS network publicly
as well to facilitate p2p exchanges.

If you are using “window.ipfs”, “Linkify IPFS Addresses” or “Catch Unhandled
If you are using “Linkify IPFS Addresses” or “Catch Unhandled
IPFS Protocols” experiments, websites will be able to detect you are running
IPFS Companion. This behavior can be changed on Preferences screen by disabling
mentioned experiments.
Expand All @@ -69,7 +69,7 @@ To disable this behavior set "DNSLink lookup" to "Off" in Preferences.

We’re constantly trying to improve IPFS Companion, so we may need to change this
Privacy Policy sometimes. When we do, we will update the date at the top of this
Privacy Policy and will also post an update at https://ipfs.io/companion-privacy/
Privacy Policy and will also post an update at https://ipfs.tech/companion-privacy/
We encourage you to periodically review this Privacy Policy to stay informed, which
is ultimately your responsibility. If you use IPFS Companion after any changes
to the Privacy Policy have been posted, that means you agree to all of those
Expand Down
68 changes: 0 additions & 68 deletions add-on/src/lib/precache.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
'use strict'
/* eslint-env browser, webextensions */
// import CID from 'cids'

// import Tar from 'it-tar'
// import pipe from 'it-pipe'
// import all from 'it-all'
// import concat from 'it-concat'

import debug from 'debug'
const log = debug('ipfs-companion:precache')
Expand Down Expand Up @@ -70,65 +64,3 @@ async function inRepo (ipfs, cid) {
return false
}
}

// Downloads CID from a public gateway
// (alternative to ipfs.refs -r)
/*
async function preloadOverHTTP (log, ipfs, state, cid) {
const url = `${state.pubGwURLString}api/v0/get?arg=${cid}&archive=true`
try {
log(`importing ${url} (${cid}) to local ipfs repo`)
const { body } = await fetch(url)
await importTar(ipfs, body.getReader(), cid)
log(`successfully fetched TAR from ${url} and cached under CID ${cid}`)
} catch (err) {
log.error(`error while processing ${url}`, err)
}
}
async function importTar (ipfs, tarReader, expectedCid) {
const files = []
await pipe(
streamTar(tarReader),
Tar.extract(),
async (source) => {
for await (const entry of source) {
// we care only about files, directories will be created implicitly
if (entry.header.type !== 'file') continue
files.push({
path: entry.header.name.replace(`${expectedCid}/`, ''),
content: (await concat(entry.body)).slice() // conversion: BufferList → Buffer
})
}
}
)
const { version, multibaseName } = new CID(expectedCid)
const opts = {
cidVersion: version,
wrapWithDirectory: true,
pin: false,
preload: false
}
const results = await all(ipfs.addAll(files, opts))
const root = results.find(e => e.cid.toString(multibaseName) === expectedCid)
if (!root) {
throw new Error(`imported CID (${root}) does not match expected one: ${expectedCid}`)
}
}
async function * streamTar (reader) {
try {
while (true) {
const { done, value } = await reader.read()
if (done) return
yield value
}
} finally {
// Firefox only? https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock
if (typeof reader.releaseLock === 'function') reader.releaseLock()
}
}
*/
1 change: 0 additions & 1 deletion docs/window.ipfs.md

This file was deleted.

49 changes: 0 additions & 49 deletions examples/window.ipfs-fallback.html

This file was deleted.

0 comments on commit 6dc3488

Please sign in to comment.