-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matching on urls rather than domains only #67
Comments
Keep in mind that the method only checks for exact matches, as in nothing that isn't wildcarded shouldn't be left or it won't match: Hence why I said it might be tricky to add this feature without breaking existing domain-only rules or changing the UI to allow different rule types to be added.
Only for non-ASCII characters or spaces.
Best way is to set some breakpoints and step through the code. |
Thanks. |
Did you make any rules? Debug mode settings may be stored separately from the installed version. Try adding some rules when launching as debug then restarting the app and checking its value. |
Mate, whichever file I try to run I see null in autobrowser regardless of whether I've set a rule or not. the rules are being saved between runs and are separate to the installed version.
should I be running browser.cs or program.cs?
any ideas to help getting it running? thanks
On 21/06/2020 23:03:06, Borhan Hafez <[email protected]> wrote:
Settings.Default.AutoBrowser is null
Did you make any rules? Debug mode settings may be stored separately from the installed version. Try adding some rules when launching as debug then restarting the app and checking it's value.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [#67 (comment)], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AANQOL6M2T3TS2N7TMAC3GDRXZ7RVANCNFSM4OD2IOCQ].
|
I don't run files individually, if you open Alternatively, you can manually verify if the options are saved or not by looking at the path it should save them in. You can find this path programmatically by running: var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath; (you may need some imports/references for it to work) On my system that path is:
The hash-style part may be different for you, but it should stay the same between builds using the same system/ide. Try checking the file's content or manually copying your normal config overwriting the one debug instance uses.
Hope this helps. |
got it, thanks. it seems on at least the first pass through the loop at line 55 the autobrowser is null...I can sort of ignore that by setting my breakpoint at line 65.
On 25/06/2020 16:14:27, Borhan Hafez <[email protected]> wrote:
I don't run files individually, if you open BrowserSelect.sln in Visual Studio it should recognize the project and allow you to debug the whole thing. Depending on what IDE you use you may be able to load BrowserSelect.csproj instead, which is an XML file including a list of all the dependencies and files required for the project to function.
Alternatively, you can manually verify if the options are saved or not by looking at the path it should save them in. You can find this path programmatically by running:
var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
(you may need some imports/references [https://stackoverflow.com/a/7069366/1461004] for it to work)
On my system that path is:
C:\Users\Bor\AppData\Local\BrowserSelect\BrowserSelect.exe_Url_1aa1pcucfjv1jpsasunq3pmxflnpikth\1.4.1.0\user.config
The hash-style part may be different for you, but it should stay the same between builds using the same system/ide. Try checking the file's content or manually copying your normal config overwriting the one debug instance uses.
Sometimes when debugging the first part may be BrowserSelect.vshost.exe instead of BrowserSelect.exe.
[image] [https://user-images.githubusercontent.com/4184939/85746848-04758780-b71c-11ea-9db3-705218e7e63a.png]
Example of Settings.Default.AutoBrowser getting its value from the config file.
Hope this helps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [#67 (comment)], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AANQOL6PTZROCLKWY5MKFN3RYNSVHANCNFSM4OD2IOCQ].
|
I've had a look at the code but as I mentioned - unfamiliar with c# - if you can help me log/debug the url matching code I reckon I could work it out - at the moment I can't 'see' what parameters are being passed into the regex check in DoesWildcardMatch (and DoesDomainMatchPattern) even when I break drop the scheme from the uri (uri.host+uri.pathandquery+uri.fragment) - I guess there may be some escaping but not sure :(
That is unrelated to this issue, please open a new one. But in short, the wildcard is already supported, (e.g. *.whatever.com), You just need to include the path in the string the rules are checked against. Somewhere around here. Check the Uri Class documentation for properties other than
Host
to check. The tricky part would be to make sure it won't break domain-only rules if say the domain name existed somewhere in the url's path. (e.g.something.com/link/somethingelse.com/
)Originally posted by @zumoshi in #61 (comment)
The text was updated successfully, but these errors were encountered: