Enhancement request - add the MS subsite "answers"
I did some testing of my own and added the MS forum subsite of "ANSWERS.microsoft.com" to the regex just to see how good or bad it might look without modifications, and surprisingly, it looks pretty darn good already.
Here's all I changed in both the script include (I may still be having to add this to GM userscript myself if so I have the fix for you) and at the top of the script where it wraps everything in the if statement testing the same regex to:
As you can see, I just tacked the "answers" onto the beginning.
There are a couple little boxes that aren't perfect, but I would request maybe leaving it as-is now in next version as a start and just making more adjustments later.
EDIT: Forgot the screenshots. Boy, what a difference a ONE WORD code change can make (on the eyes)! :)
FYI the script update is good - but because the MOZ wrapper required for the conversion to the userscript and converts it to an @include is missing - I have to manually copy/paste replace an include back manually every single update.
I've helped some other DEVs with this - make the very first line the MOZ doc with your regex and bracket wrap the entire script inside of it and the site will properly convert that regex to a userscript include that is currently missing.
In fact, on Chrome/Tampermonkey today this script upon install won't actually execute because it's missing all includes so it literally sits enabled but totally inactive. So, anyone else running this as a userscript HAS to be manually adding includes, even if it's the dreaded "*" which I guess will work and then rely on your regex. Personally, I'd rather use that regex at the top include level as to not have to run every web request further into the script if it can be avoided.
...and then what the site spits out for the userscript will have the proper include(s).
I've tested many different configurations, and only without using regex it worked. :(
Also many scripts on this site are incompatible with Greasemonkey/Tampermonkey.
Might I suggest using Stylus? It's much better suited for CSS.
Actually if you look at the Github dark style you will see (and I can point you to some others) that if you wrap the script in the proper moz doc regexp statement, the userstyles.org site will convert it properly and add the includes. You literally take your entire codebase CSS with it's current IF logic testing regex (others do this just fine) and paste the entire thing inside a single MOZ DOC regexp statement as shown here (last line on the page is what you want):
I'm working with some other authors right now that also thought along the same lines and did not even realize the MOZ syntax (and whitespace) was that specific and were not wrapping their CSS properly since all anyone on this site submits is CSS anyway meant for Stylus and then this site is what then creates the userscript.js and is VERY finacky (and strict) about how it does so which is why about 50% of converted userscripts have proper includes and 50% do not!
It's funny this seems to be a common misnomer; heck I'm helping one author who also did not think it was possible - and he is actually using ALL the moz doc wrapper variations and sure enough the site-generated userscript.js version of his submission (when it finally got wrapped properly) added not only the standard domain includes, but then also many match statements and then even added the regexp 3rd type as well, and threw in separate update string includes, external script includes etc. and it all had to convert from submitted Stylish CSS and sure enough - he just needed to follow the strict MOZ doc formatting and then it all worked great.
If you want if I have time I'm happy to take your top regex logic IF's and stick a hello world inside of it then wrap the whole thing inside the MOZ doc regexp and publish it just to verify. It would help your userscript.js users because anyone can kill Stylish and refresh the page you will then be able to download it as a userscript.js and you can see it has no includes (not even a *) hence GM/TM will load it and upon load warn that without a valid include, it's not actually going to function on a single site or page (which is why I re-add your regex's myself as includes right now to use it).
FYI, not sure if you are tracking on this (I'm approaching my 30yrs in the bus so I have to keep up on this) aware but last year the Stylish extension, this site userstyles, and all the IP changed hands and is now run by an analytics company (SimilarWeb) that the new guy from that co who has very little overall experience (Justin) confirmed in the forum here that the Stylish ext can (and does) collect all browsing stats and has many authors actually pulling out completely. I and others have actually given up on ever even getting a simple response to questions regarding exactly what we are discussing (site conversion) - Jason used to respond quickly and now it seems to go into a black hole.
Which leads me to one good example I'll offer - I just finished a follow-up on a forensic write-up I did last year on the vastly popular old nEnhancer Chrome ext to pretty up Netflix (similar to Stylish but more advanced JS functions) that has literally had hundreds of thousands of downloads over the years and until last year was, from my and other's analysis, pretty standard and legit - so similar to a Stylish closed-source plugin that does similar CSS changes and has the user allow all the necessary permissions to allow tracking and changing all websites but then does NOT provide it's source code.
In my example - last year the nEnhancer ext suddenly significantly elevated it's permission demands and like everyone else, I had it installed for years and just blindly clicked okay. Then, one day, all my Chrome traffic failed as every link I visited seemed to redirect to some domain that when looked up, had just recently been purchased and brought online and low and behold was found my me and others one by one through trial and error to be the innocent nEnhancer extension that instead of only wanting access to netflix.com, now had changed to ALL SITES.
FF through hundreds of hrs of my forensic analysis and code deobfucation and network sniffing to find that those "new permissions" sure had a reason it was right there in the code - the VERY sophisticated randomized self-activation (think stuxnet) that downloads a magic list of hundreds of thousands of $$ affiliate links, then randomly again sits before using the user (MINE) user account, bandwidth, web browser all without any knowledge or more importantly disclosure silently open Chrome panel pages to click links and also track activity.....not saying Stylish is doing anything similar, just that when I read that yes even opting out tracking can and will be done....I don't think enough people really know what the underlying code from some of these Chrome extensions are really doing and there in lies yet one big reason I really am a fan of GM/TM/userscripts (back when Chrome actually allowed native userscripts was really nice) is that the GM/TM extensions code are just really a wrapper (but unlike Stylish fully open-source) that execute and inject JS (in a nutshell) and on top of all that advanced functionality, I know what the wrapper code is, and I can see every line of code that will be executed in my sessions.
If you're interested, here's my college's article giving a good high-level overview of the exact type of browser hijack the nEnhancer is/was doing (in fact I actually found some of Ido's article's linked code VERBATIM inside of the new versions):
....and one of my many writeups as I was beginning the forensic analysis of the nEnhancer ext sudden malicious behavior to another college's site upon his request:
...and one of the follow-up videos I shot of the beginning of analysis but shows first-hand evidence of just some of what such a popular extension was really doing (this is a quick/short one but shows some good sniffer/fiddler evidence in this one I think):
Anyway, thought maybe it would interest you as we talk extensions, and bear in mind this isn't the Stylish ext above doing all this bad stuff, but you know what? This popular extension also began with a code change, tons of loyal trusting users, and some elevated perms like change all site data (that Stylish obviously needs and has today anyway) and to this day, despite me and a handful of other well-known security professionals agreeing with my assessment and fully reporting it to Google multiple times, for some reason Google has STILL not even pulled this extension down out of the store and is still hijacking users' systems! So, I do NOT trust for a minute that "even though I can't see the source code, XYZ would never allow their extension like nEnhancer, Stylish, (fill in blank) to do such things to MY system....because they already did!
I was talking about a new fork of Stylish based on the code before Justin took the project..., Stylus.
It doesn't have any tracking code, has improved features, and the code is maintained by community on Github.
The reason why I prefer this over Tampermonkey, is that Stylus works at document.start, is better suited for editing, and can disable/enable CSS quickly via Chrome's keybind without requiring page refresh.
I'm also learning these @moz-rules and am happy to take any advice on the subject.
My goal in future could be to transfer styles to greasyfork.
Could I trouble you to fix my domain rules, but with all the links that are in include. (It doesn't work for me when there are more than one)?