setting background picture via user-stylesheet.css/allow to load local resource #1189
Replies: 1 comment
-
I don't think it's possible. The page is served from a custom URI scheme, and I believe It could switch to using local files, but the main reason it uses a custom URI scheme now is that ES6 modules need to be from the same origin, and browsers treat each local file as a different origin. So to do that it would need to use a bundler, which I would like to avoid. Allowing the book to load local files, even just images, could also be problematic in terms of security. Probably a solution would be to have a dedicated directory in the config directory that is loaded by the function that handles the custom URI scheme. For now you should be able to use |
Beta Was this translation helpful? Give feedback.
-
Hi guys. As a rather new user of foliate with the new gtk4 engine, and a passionate digital bookworm, I would like to insert an opaqued background picture general to all my books.
How/In which folder I have to insert a background picture to be loaded via user-stylesheet.css?
body {
background-image: url("file");
}
in user-stylesheet.css?
Trying file=file:///correct_path results in "Not allowed to load local resource".
Version:
Beta Was this translation helpful? Give feedback.
All reactions