Closed ghost closed 10 years ago
Subdomain handling is still the same regex-mess like before just with a nice and sortable table around it. Changes are backwards compatible so even though it's not perfect, it's still better than before I think. Temporary whitelisting and import/export is not yet supported but should be easy to add.
The problem with using checkboxes for subdomains AND at the same time being backwards compatible is that the subdomains may include any strings (like "www") which are lost once we replace them with . Consider for example: ```^www.example.com$,..github.com$```, there is no subdomain for github.com to reactivate.
I think simplifying this would be good, even if it means we lose some flexibility. We don't want people to enter a terrible regex and make themselves insecure.
I freaking LOVE this patch! :) Excellent idea, and excellent work. I especially love that you can click to edit the regex inside the tree view; that's glorious :)
This gives me a few ideas for other improvements too:
Some screenshots of the new UI in action:
The current whitelist UI is a simple textfield using a comma-separated string of regexes. We could redesign it to a table listing domains and checkboxes for enable/disable, "include subdomains". The table should support sorting and multi-selection for remove- and import/export-buttons. Any change needs to be backwards compatible to the old "perspectives.whitelist" preference. If there is any change to the preference it might be updated to the new "extensions." prefix as well (see #59), thus something like "if perspectives.whitelist still exists, it's old format, convert it and write it to extensions.perspectives.whitelist".
Also see #63 for "temporary whitelisted domains". The table may have an additional column for a "temporary" checkbox.