Skip to content

Commit e6bd589

Browse files
committed
Minor fixes
1 parent 59d2f0e commit e6bd589

File tree

9 files changed

+66
-16
lines changed

9 files changed

+66
-16
lines changed

extension-manifest-v2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"foundation-sites": "^6.6.2",
5252
"ghostery-common": "^1.3.12",
5353
"history": "^4.10.1",
54-
"hybrids": "^8.2.15",
54+
"hybrids": "^8.2.16",
5555
"linkedom": "^0.14.21",
5656
"moment": "^2.29.1",
5757
"prop-types": "^15.6.2",

extension-manifest-v3/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@ghostery/ui": "^1.0.0",
4040
"@github/relative-time-element": "^4.3.0",
4141
"@whotracksme/webextension-packages": "5.0.5",
42-
"hybrids": "^8.2.15",
42+
"hybrids": "^8.2.16",
4343
"idb": "^7.1.1",
4444
"jwt-decode": "^4.0.0",
4545
"tldts-experimental": "^6.0.19"

extension-manifest-v3/src/pages/panel/views/navigation.js

+28-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import assets from '/pages/settings/assets/index.js';
2020
const MENU = [
2121
{},
2222
{
23-
icon: 'alert',
23+
icon: 'report',
2424
label: msg`Report a broken page`,
2525
href: 'https://www.ghostery.com/support?utm_source=gbe',
2626
},
@@ -36,10 +36,34 @@ const MENU = [
3636
},
3737
{},
3838
{
39-
icon: 'settings',
40-
label: msg`Ghostery settings`,
41-
href: chrome.runtime.getURL('/pages/settings/index.html'),
39+
icon: 'shield-menu',
40+
label: msg`Privacy protection`,
41+
href: chrome.runtime.getURL(
42+
'/pages/settings/index.html#@gh-settings-privacy',
43+
),
4244
},
45+
{
46+
icon: 'websites',
47+
label: msg`Websites`,
48+
href: chrome.runtime.getURL(
49+
'/pages/settings/index.html#@gh-settings-websites',
50+
),
51+
},
52+
{
53+
icon: 'block-m',
54+
label: msg`Trackers`,
55+
href: chrome.runtime.getURL(
56+
'/pages/settings/index.html#@gh-settings-trackers',
57+
),
58+
},
59+
{
60+
icon: 'wtm',
61+
label: msg`WhoTracks.Me`,
62+
href: chrome.runtime.getURL(
63+
'/pages/settings/index.html#@gh-settings-whotracksme',
64+
),
65+
},
66+
{},
4367
{
4468
icon: 'info-menu',
4569
label: msg`About`,

extension-manifest-v3/src/pages/panel/views/protection-status.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
: msg`Our recommendation for this activity: Trusted`}
8383
</ui-text>
8484
</gh-panel-card>
85-
<gh-panel-card layout="row gap items:center">
85+
<gh-panel-card layout="row gap">
8686
<div layout="grow">
8787
<ui-text type="label-m">
8888
Add ${stats.domain} as exception
@@ -100,6 +100,7 @@ export default {
100100
onchange="${toggleException('blocked')}"
101101
type="status"
102102
color="danger-500"
103+
layout="margin:top:0.5"
103104
></ui-toggle>
104105
`
105106
: html`
@@ -108,6 +109,7 @@ export default {
108109
onchange="${toggleException('allowed')}"
109110
type="status"
110111
color="success-500"
112+
layout="margin:top:0.5"
111113
></ui-toggle>
112114
`}
113115
</gh-panel-card>

extension-manifest-v3/src/pages/settings/settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
class="${{ active: router.active(Websites) }}"
4242
slot="nav"
4343
>
44-
<ui-icon name="settings" color="nav" layout="size:3"></ui-icon>
44+
<ui-icon name="websites" color="nav" layout="size:3"></ui-icon>
4545
Websites
4646
</a>
4747
<a

extension-manifest-v3/src/utils/tabs.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@
99
* file, You can obtain one at http://mozilla.org/MPL/2.0
1010
*/
1111

12-
export function openTabWithUrl(host, event) {
12+
export async function openTabWithUrl(host, event) {
1313
const { href } = event.currentTarget;
1414

1515
event.preventDefault();
16+
17+
try {
18+
const tabs = await chrome.tabs.query({ url: href.split('#')[0] });
19+
20+
if (tabs.length) {
21+
await chrome.tabs.update(tabs[0].id, { active: true, url: href });
22+
globalThis.close();
23+
24+
return;
25+
}
26+
} catch (e) {
27+
console.error('Error while try to find existing tab:', e);
28+
}
29+
1630
chrome.tabs.create({ url: href });
1731
}

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"test": "npm run lint"
2222
},
2323
"dependencies": {
24-
"hybrids": "^8.2.15"
24+
"hybrids": "^8.2.16"
2525
}
2626
}

packages/ui/src/modules/global/components/icon.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)