live-css-editor icon indicating copy to clipboard operation
live-css-editor copied to clipboard

Edit list of sites which the extension affects

Open Unknow0059 opened this issue 6 years ago • 1 comments

I'd like to be able to edit the list of sites that a CSS code I make with this extension affects and to use a wildcard. Because in itch.io I have changed one element, but it only applies to a specific page, not to any page under itch.io. Example: If I edit an element of the site username01.itch.io/page, that same element in the site username02.itch.io/page will not be changed. In this case, it would be great if I could use a wildcard in place of 'username' and 'page'.

Unknow0059 avatar Mar 29 '20 18:03 Unknow0059

Since these two domains represent two different origins, it would not be a straight-forward implementation.

This change would directly or indirectly affect the following aspects of the extension:

  • The implementation itself (whether to keep it specific to domain name or generic enough to let the user map different domains/hosts)
  • localStorage mode
  • permissions workflow for auto-apply changes

I can think of another (slightly ugly) workaround, consisting of two steps (this workaround covers even more use cases without increasing the complexity of the current approach):

  • Step 1 - Add 3 attributes to the <html> tag, like, data-domain="example.com" data-host="dummy.example.com:3000" data-href="https://dummy.example.com:3000/page.html". This would be done automatically (like the "reapply style automatically" feature).
  • Step 2 - Let the user add a common piece of CSS (say, via "options page") which would be automatically applied to the pages which have "reapply style automatically" feature turned on. So, with appropriate CSS selectors, one would be able to write CSS code targeting their specific range of page sources.

Having said this, it may take some time before such a change is implemented.

webextensions avatar Apr 01 '20 20:04 webextensions