Closed Gitoffthelawn closed 3 years ago
Sorry, no, youre removing actually needed stuff. Its there for a reason.
No problem. What reason? I'm running the code without issues, but perhaps I'm not encountering an issue you've encountered.
regexp("^https?://((chat|meta|es|ja|pt|ru)\\.)*stackoverflow\\.com.*")
and replacing it with stackexchange only.image links youre removing bits like ?v=8f7dca5b94db
These point to specifc image versions.
All and all most of the regex for domain changes are mostly wrong because they no longer apply to specific areas and instead only work for areas that they are not designed to work with so now in these old places that it worked now doesnt.
If you dont want to use our theme for stackoverflow because they have a native dark theme, thats OK, you dont have to use this theme at all.
All and all, if this is what you want to do, feel free to fork, and then change names and add whatever you feel suits your preferences better.
Some of the changes are OK, typos etc, but too few to make this perform any better than before.
Thanks for understanding.
No problem at all. Thanks for permission to fork.
Just follow the license requirements and all will be OK.
Also modified the PR title to match the intention or the changes.
Be warned, when you using this with the changes included in PR much will break stackexchange side and many of the overrides stackoverflow are there to make all sites this applies to look the same. You will not get that benefit anymore and if you actually use the sites features fully (not just browser/reply/ask) you will see what I mean then.
You would be better served making a theme for stackexchange from scratch using this as a reference.
@the-j0k3r Thanks for the tips. BTW, the style here calls external resources (images). It's not doing anything inappropriate, but it would be great if somehow it was disclosed. I'm not sure exactly how it could be done, but it would be great if styles somehow had a disclaimer/indicator to indicate that they pull external resources. Maybe even a tiny permission system to say "are you okay installing a style that uses external resources?".
Anyways, it's just a thought, and while we are chatting I thought I would mention it real quick. I'm interested in hearing your thoughts on the topic.
Thanks again for the tips and ideas.
We can add something in readme, anything else not possible. Userstyles dont have a way to call permissions dialogs.
Also as for the external images they can be base64 encoded and that used instead, but tbh its low priority. Any such replacements have to be done properly and made sure its not breaking something where image is shown.
This takes time, time I dont have to ensure its correctly done at the moment.
Feel free to submit a PR that takes this into consideration.
@the-j0k3r Thank you for the feedback. Take care.
I had a quick look, there only 1 external image (a logo), the rest are from StackOverflow/Stackexchange themselves
This from stylishthemes https://github.com/StylishThemes/StackOverflow-Dark/blob/fd557a2c30a0458608e3a830e2fd4c8e804e61d2/stackoverflow-dark.user.css#L3229
and things like
Belong to SO/SE
All of them can be downloaded, base64 converted and optimized and using them would probably be a better way. However checking then its not actually breaking something is another matter.
Which external resource actually worries you in particular?
Would you be OK with a readme note? Apparently less than 1% of our users reads the readme anyway.
Improved performance by removing redundant regular expressions, simplifying existing ones, and removing them when not needed. Removed tracking parameters from URLs. Other fixes minor enough to be included in this PR.