bekh6ex / firefox-container-proxy

[Firefox extension] Assign a proxy to a Firefox container
https://addons.mozilla.org/en-US/firefox/addon/container-proxy/
BSD 2-Clause "Simplified" License
137 stars 14 forks source link

Add option to override Private Windows' proxies #38

Closed qwerty12 closed 2 years ago

qwerty12 commented 3 years ago

Thanks for this extension. Could an option be added to override the proxy used by Private Windows too? I've tried the following here and it works (sorry for the lack of PR, but this lacks i18n and an icon):

diff --git a/src/options/ContainerListView.ts b/src/options/ContainerListView.ts
index e31a175..1eb7109 100644
--- a/src/options/ContainerListView.ts
+++ b/src/options/ContainerListView.ts
@@ -46,7 +46,15 @@ export class ContainerListView implements Component {
       icon: '',
       iconUrl: ''
     })
-    return m('.containers', [...items, defaultContainer])
+    const privateContainer = this.renderContainerItem({
+      cookieStoreId: 'firefox-private',
+      name: 'Private Browsing',
+      color: '',
+      colorCode: '',
+      icon: '',
+      iconUrl: ''
+    })
+    return m('.containers', [...items, defaultContainer, privateContainer])
   }

   renderSelectProxy (cookieStoreId: string, proxyId: string): Vnode {
ntninja commented 3 years ago

This works! Please add this!

bekh6ex commented 2 years ago

Implemented in version 0.1.19. @qwerty12 Thank you for the code!

ntninja commented 2 years ago

Thanks! :-)