Closed Bauke closed 6 years ago
(closed by mistake)
I've implemented basic support for this. You can enter multiple comma separated stylesheets, as well as additional custom CSS which is all concatenated together and stored.
One caveat, I've not actually tested it, as I only have access to git and VSCode currently, but no build tools.
Here's the commit for it on my own branch, any chance you can take a look at it and see if this is going in the right direction?
I just finished after a 3 hours working on some bug-fixes, I'll have lunch and give it a look between today and tomorrow.
As a generic heads up, I want to try and give the option UI a better look quite soon as new features are added quickly enough and I don't feel like keep adding stuff in a never-ending scrolling page.
This is to give you an heads up in not limiting yourself in a single text field with URL to be sent with a comma as separator. Especially because right now we've quite tech savvy users but in the future could not be the same.
having said that, for now don't worry about UI and go ahead, i'll check on it soon enough :)
And thanks!
Here's the branch for the change: https://github.com/theCrius/tildes-extended/tree/features/extended_css
Working on it, there were some typos. I'm cleaning up. Will commit soon enough :)
Ok , just pushed this 3d5f29dbadd98af205481b266d3452139897cc1d
I basically cleaned it up and fixed some typos and lines that has been eaten by the branching out.
The biggest issue was using .map() without assigning its returned value to anything. That was making everything just run empty :)
I used $.ajax synchronous for the sake of easier code to read but I'd like for it to be asynchrounous mostly because it locks the page and it's horrible to see (not that the user should do anything while we load css/save).
In my book it's not an high priority anyway so feel free to experiment with it if you want.
Imho we could join this into the develop branch and give it a full test. I don't have time today but to be honest the changes are quite limited to the dedicated feature's files and it's something I meant to be like that to avoid too broad side effects
If you feel like testing, compile it locally and try to load the unpackaged extension. I tested quickly with Dracula Theme + Compact + a custom css (changing colours around) and seems to be working.
Add the ability to add more input boxes for multiple custom styles. I've been working on a Tildes Compact style which doesn't change any of the colors or anything but instead modifies the layout (and makes it more compact).
Having the ability to add multiple custom styles somebody could use both a custom theme and something like Tildes Compact.
Something like this