diff options
author | Mark Stacey <markjstacey@gmail.com> | 2019-08-03 02:59:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-03 02:59:28 +0800 |
commit | 75d53745826fd7927ec24240f4462bf4226464de (patch) | |
tree | cd03881a1ab0142951b33131e3c29f1577fe2afb /app | |
parent | 2649b9b8bb5b675217e3ab9258d96797f3bcdfba (diff) | |
download | tangerine-wallet-browser-75d53745826fd7927ec24240f4462bf4226464de.tar.gz tangerine-wallet-browser-75d53745826fd7927ec24240f4462bf4226464de.tar.zst tangerine-wallet-browser-75d53745826fd7927ec24240f4462bf4226464de.zip |
Restrict unconnected notice to specific protocols (#6954)
The notice asking whether you wanted to connect to a site was showing
up in places it shouldn't, like on the Firefox/Chrome settings pages
and on our fullscreen extension. It has now been restricted to only
be displayed for active tabs with specific protocols:
* http
* https
* dat
* dweb
* ipfs
* ipns
* ssb
This prevents the notice from being shown on settings pages, browser
extensions, and files such as PDFs.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/ui.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/ui.js b/app/scripts/ui.js index a1f904f61..a99da37a0 100644 --- a/app/scripts/ui.js +++ b/app/scripts/ui.js @@ -92,9 +92,9 @@ async function queryCurrentActiveTab (windowType) { extension.tabs.query({active: true, currentWindow: true}, (tabs) => { const [activeTab] = tabs const {title, url} = activeTab - const origin = url ? urlUtil.parse(url).hostname : null + const { hostname: origin, protocol } = url ? urlUtil.parse(url) : {} resolve({ - title, origin, url, + title, origin, protocol, url, }) }) }) |