MCPcopy
hub / github.com/mozilla/multi-account-containers / updateProxyInputs

Method updateProxyInputs

src/js/popup.js:1693–1718  ·  view source on GitHub ↗
(proxyInfo)

Source from the content-addressed store, hash-verified

1691 }
1692
1693 updateProxyInputs(proxyInfo) {
1694 const resetProxyStorageEls = () => {
1695 [this.proxyAddressInput, this.cityNameInput, this.countryCodeInput, this.mozProxyEnabledInput].forEach(el => {
1696 el.value = "";
1697
1698 });
1699 this.advancedProxyAddress.textContent = "";
1700 };
1701
1702 resetProxyStorageEls();
1703
1704 if (typeof(proxyInfo) === "undefined" || typeof(proxyInfo.type) === "undefined") {
1705 // no custom proxy is set
1706 return;
1707 }
1708
1709 this.cityNameInput.value = proxyInfo.cityName;
1710 this.countryCodeInput.value = proxyInfo.countryCode;
1711 this.mozProxyEnabledInput.value = proxyInfo.mozProxyEnabled;
1712 this.proxyAddressInput.value = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
1713
1714 if (typeof(proxyInfo.countryCode) === "undefined" && proxyInfo.type) {
1715 // Set custom proxy URL below 'Advanced proxy settings' button label
1716 this.advancedProxyAddress.textContent = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
1717 }
1718 }
1719
1720 async updateProxyDependentUi(proxyInfo) {
1721 const mozillaVpnProxyLocationAvailable = (proxy) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected