Skip to content

Commit

Permalink
Add Browser Infos
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Sep 25, 2024
1 parent 82a1fb2 commit 171e265
Show file tree
Hide file tree
Showing 9 changed files with 572 additions and 17 deletions.
11 changes: 10 additions & 1 deletion frontend/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,23 @@ const ShortcutKeys = (isOriginalSite) => {
description: t('shortcutKeys.DNSResolver'),
},
{
keys: "b",
keys: "C",
action: () => {
scrollToElement("AdvancedTools", 80);
advancedToolsRef.value.navigateAndToggleOffcanvas('/censorshipcheck');
trackEvent('Nav', 'NavClick', 'CensorshipCheck');
},
description: t('shortcutKeys.CensorshipCheck'),
},
{
keys: "b",
action: () => {
scrollToElement("AdvancedTools", 80);
advancedToolsRef.value.navigateAndToggleOffcanvas('/browserinfo');
trackEvent('Nav', 'NavClick', 'BrowserInfo');
},
description: t('shortcutKeys.BrowserInfo'),
},
{
keys: "W",
action: () => {
Expand Down
7 changes: 6 additions & 1 deletion frontend/components/Advanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const cards = reactive([
{ path: '/censorshipcheck', icon: '🚧', titleKey: 'censorshipcheck.Title', noteKey: 'advancedtools.CensorshipCheck' },
{ path: '/whois', icon: '📓', titleKey: 'whois.Title', noteKey: 'advancedtools.Whois' },
{ path: '/macchecker', icon: '🗄️', titleKey: 'macchecker.Title', noteKey: 'advancedtools.MacChecker' },
{ path: '/browserinfo', icon: '🖥️', titleKey: 'browserinfo.Title', noteKey: 'advancedtools.BrowserInfo' },
]);
const cardInvisibilityTest = { path: '/invisibilitytest', icon: '🫣', titleKey: 'invisibilitytest.Title', noteKey: 'advancedtools.InvisibilityTest' };
Expand Down Expand Up @@ -126,9 +127,13 @@ const navigateAndToggleOffcanvas = (routePath) => {
trackEvent('Nav', 'NavClick', 'MacChecker');
openedCard.value = 6;
break;
case '/browserinfo':
trackEvent('Nav', 'NavClick', 'BrowserInfo');
openedCard.value = 7;
break;
case '/invisibilitytest':
trackEvent('Nav', 'NavClick', 'InvisibilityTest');
openedCard.value = 7;
openedCard.value = 8;
break;
}
var offcanvas = new Offcanvas(document.getElementById('offcanvasTools'));
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/IpInfos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const fetchIP = async (cardID, getFromSource) => {
ipDataCards[cardID].source = source;
IPArray.value = [...IPArray.value, ip];
await fetchIPDetails(cardID, ip);
} else if (cardID === 3 || cardID === 5) {
} else if (cardID === 2 || cardID === 5) {
ipDataCards[cardID].ip = t('ipInfos.IPv6Error');
} else {
ipDataCards[cardID].ip = t('ipInfos.IPv4Error');
Expand Down
Loading

0 comments on commit 171e265

Please sign in to comment.