xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
1.02k stars 86 forks source link

StyloaiX @import url within chrome profile folder doesn't work #189

Closed megamorphg closed 1 year ago

megamorphg commented 1 year ago

When I try to import the "autohide_sidebar.css" in a different chrome profile folder, it doesn't work: @import url("../../aeskq86n.default-ahmed/chrome/firefox-csshacks/chrome/autohide_sidebar.css");

The CSS is within a different chrome profile folder and this works fine with normal userChrome.css modification. I'd like to be able to enable/disable this without restarting FF and tested that other styles work fine so it is something to do with importing syntax?

xiaoxiaoflood commented 1 year ago

StyloaiX's styles path is like resource://userchromejs/UserStyles/autohide_sidebar.css. The root resource://userchromejs/ is the chrome folder from running profile.

If you need to import from outside this context, you must use full path like file:///home/user/.mozilla/firefox/aeskq86n.default-ahmed/chrome/firefox-csshacks/chrome/autohide_sidebar.css.

If unsure of full path, just drag the file from your file manager to Firefox and copy the value in addressbar.

megamorphg commented 1 year ago

Ah, looks like I can't share a single CSS across profiles with StylaoiX then (without symlink). Btw had to use "file://" and not "file:////"; maybe it's a Windows thing.