Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: disable integrations per website #830

Merged
merged 3 commits into from
Dec 12, 2019

Conversation

lidel
Copy link
Member

@lidel lidel commented Dec 10, 2019

This PR replaces per-site redirect toggle with one that disables ALL IPFS integrations: redirect to local gateway, injection of content scripts, DOM changes, and access to API via window.ipfs

closes #828, closes #820, cc #710, #689, #589

Motivation

Instead of disabling redirect per website, users should be able to disable all integrations that change page, mutate DOM etc.

Tasks

  • rename toggle
  • make it control redirects, content scripts, and access to window.ipfs
  • migrate hostnames already added by users to the old redirect opt-out
    (noRedirectHostnamesnoIntegrationsHostnames)
  • tweak the order of menu items to prioritize actions related to a current tab

Preview

User can disable IPFS per host, including DNSLink websites:

2-2019-12-11--16-45-47

If website is powered by DNSLink, the toggle will disable redirect, but there will be an option to open it manually:

1on--2019-12-11--16-45-19

We redirect DNSLink websites by default, but this behavior can be tweaked via Preferences:

3-2019-12-11--16-46-48

@lidel lidel self-assigned this Dec 10, 2019
@lidel lidel force-pushed the feat/disable-integrations-on-page branch from 60eab90 to 4e8eec1 Compare December 10, 2019 17:51
This change replaces per-site redirect toggle with one that disables ALL
IPFS integrations: redirect, content scripts, and access to API via window.ipfs

It also changes the order of menu items to prioritize actions
related to a current tab.
@lidel lidel force-pushed the feat/disable-integrations-on-page branch from 4e8eec1 to 12440ff Compare December 11, 2019 15:48
@lidel lidel marked this pull request as ready for review December 11, 2019 16:40
"message": "Redirect on $1",
"description": "A menu item in Browser Action pop-up (panel_activeTabSiteRedirectToggle)"
"panel_activeTabSiteIntegrationsToggle": {
"message": "Enable on $1",
Copy link
Member Author

@lidel lidel Dec 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if Enable on <hostname> is the best label for this menu item, but it is short and simple.
Let me know if there is a better one.

@@ -280,7 +280,7 @@
"description": "An option description on the Preferences screen (option_useCustomGateway_description)"
},
"option_dnslinkRedirect_title": {
"message": "Force page load from custom gateway",
"message": "Load websites from Custom Gateway",
Copy link
Member Author

@lidel lidel Dec 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Softening language because we restored the old behavior in #831
(and matching capitalization from other places)

@lidel lidel added this to the v2.10 milestone Dec 12, 2019
@lidel
Copy link
Member Author

lidel commented Dec 12, 2019

I'm merging this to ship in beta before v2.10.
It will be easier to gather feedback on labels used in UI when people can play with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

empty "active tab" menu on non-ipfs pages "redirect to gateway" unsets itself
2 participants