FelisCatus / SwitchyOmega

Manage and switch between multiple proxies quickly & easily.
GNU General Public License v3.0
21.26k stars 3.19k forks source link

feature suggestion: default to FQDN instead of top level domain in creating a rule #1304

Open royharoush opened 6 years ago

royharoush commented 6 years ago

Hi, Add condition will take the main domain (example.com) when constructing a new rule by default. In my work i have to set different proxies for multiple subdomains, so having the rule creation default to the fqdn makes alot more sense.

image

could you add a checkbox in button to select either behaviour ? Thanks ! Roy

FelisCatus commented 6 years ago

Thanks for the report. Unfortunately the popup is already packed up with too many features and is too slow. I would rather wait for more supporters before considering this.

royharoush commented 6 years ago

@FelisCatus i'm not suggesting you should add a checkbox in the popup, but someting in the main setup, that would be loaded before the popup is launched, wouldn't that function and the IF loop be minimal resource wise ? somethinng like.

IF checkboxFQDN = True {
 urlForRule = domain.FQDN 
 else
  urlForRule = domain.tld 
}

? either way, I'll try to pull when i have time and see if i can make it work, though i never developed a chrome extension before.

FelisCatus commented 6 years ago

it would require a read from localStorage on Chrome and message back and forth between the popup page and the background page on Firefox. Either has some performance impacts, but as long as it is performed lazily when the form is open, it will not impact user experience much.

I'm open to PR for this one. Just make sure the read is NOT performed when the popup is first opened as that would slow down the opening of the popup.

abkein commented 1 week ago

Still not implemented? It would be a very useful feature.

AnyWAT commented 1 week ago

https://github.com/FelisCatus/SwitchyOmega/issues/2513#issuecomment-2218665232