From 6dc34889cf224057e7ebeebc7518071d5e4cfc16 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 21 Nov 2022 22:19:26 +0100 Subject: [PATCH] chore: cleanup mentions of window.ipfs https://github.com/ipfs/ipfs-companion/issues/589#issuecomment-712356448 --- PRIVACY-POLICY.md | 6 +-- add-on/src/lib/precache.js | 68 ------------------------------ docs/window.ipfs.md | 1 - examples/window.ipfs-fallback.html | 49 --------------------- 4 files changed, 3 insertions(+), 121 deletions(-) delete mode 100644 docs/window.ipfs.md delete mode 100644 examples/window.ipfs-fallback.html diff --git a/PRIVACY-POLICY.md b/PRIVACY-POLICY.md index 5accb81f6..517886455 100644 --- a/PRIVACY-POLICY.md +++ b/PRIVACY-POLICY.md @@ -1,7 +1,7 @@ # **IPFS Companion Privacy Policy** First Posted: 2019-02-15
-Last Update: 2020-06-20
([change history](https://github.com/ipfs-shipyard/ipfs-companion/commits/master/PRIVACY-POLICY.md)) +Last Update: 2021-11-21 ([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 @@ -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. @@ -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 diff --git a/add-on/src/lib/precache.js b/add-on/src/lib/precache.js index 77b3d28e2..1e9b6f3b4 100644 --- a/add-on/src/lib/precache.js +++ b/add-on/src/lib/precache.js @@ -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') @@ -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() - } -} -*/ diff --git a/docs/window.ipfs.md b/docs/window.ipfs.md deleted file mode 100644 index 5a03a2818..000000000 --- a/docs/window.ipfs.md +++ /dev/null @@ -1 +0,0 @@ -Moved [here](https://docs.ipfs.io/how-to/companion-window-ipfs/) diff --git a/examples/window.ipfs-fallback.html b/examples/window.ipfs-fallback.html deleted file mode 100644 index aaaa1fc5a..000000000 --- a/examples/window.ipfs-fallback.html +++ /dev/null @@ -1,49 +0,0 @@ - -
-