File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ export const initBrowserAction = () => {
12
12
const updateTabProxyBadge = async ( tab : browser . tabs . Tab , activeProxyDetails : ProxyDetails ) => {
13
13
const { id : tabId , url } = tab ;
14
14
const { excludedHosts } = await browser . storage . local . get ( 'excludedHosts' ) ;
15
- const tabHost = new URL ( url ! ) . host ;
15
+ const tabHost = new URL ( url ! ) . hostname ;
16
16
17
- const isExcluded = excludedHosts ?. includes ( tabHost ) ;
17
+ const isExcluded = tabHost . length !== 0 && excludedHosts ?. includes ( tabHost ) ;
18
18
19
19
if ( isExcluded ) {
20
20
browser . browserAction . setTitle ( { tabId, title : `${ tabHost } is set to never be proxied` } ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const getHostProxyDetails = async (): Promise<ProxyDetails> => {
21
21
const proxiedHosts = Object . keys ( hostProxiesDetailsParsed ) ;
22
22
23
23
const activeTab = await browser . tabs . query ( { active : true } ) ;
24
- const activeTabHost = new URL ( activeTab [ 0 ] . url ! ) . host ;
24
+ const activeTabHost = new URL ( activeTab [ 0 ] . url ! ) . hostname ;
25
25
if (
26
26
proxiedHosts . includes ( activeTabHost ) &&
27
27
hostProxiesDetailsParsed [ activeTabHost ] . socksEnabled
You can’t perform that action at this time.
0 commit comments