Hi,

Was wondering if the team at OpenUserJS would consider creating a site similar to OpenUserJS, but one that caters to UserCSS.

userstyles.org was recently acquired by a new company that has made a number of questionable decisions, including adding analytics and has basically broken site functionality.

Just thought I'd throw the suggestion out there.

Re: @r-a-y:
I think extending this site to support CSS would be a great option, rather than a separate site. "OpenUserJS" might be a slight misnomer in that case, although an "install as userscript" option would be useful to have as well, just like userstyles.org has.

As far as I'm concerned, a user style is just another asset/resource. We already host javascript libraries on this site that are meant to be @require'd by the user scripts installed from the site. I once considered whether we should host css and html templates as well. The only thing I was really opposed to hosting was media (graphics, audio, videos, etc.). User scripts could use these css files via @resource and those with some type of Stylish extension could just install the styles directly. I would probably replace the "Libraries" link in the toolbar with "Resources" and that would take to a page where could filter be the type, i.e. Libraries, Styles, and Templates. If we started getting a lot of user styles uploaded here we could add a direct link to that filter in the toolbar.

Just to be clear: we really do mean Open. Anything uploaded here would have to be released under a share-alike license permitting derivative works. This would have to be a content license since code licenses used for scripts and libraries only apply to code not content like CSS (@Marti can let know if I'm wrong about this).

Re: @r-a-y:

Not sure what the brass at OpenUserJS thinks though.

Well I'll have to find out what @Marti and others think about the idea, but this site is an open source project so if somebody submitted a PR with necessary changes and the idea had support, I wouldn't stand in the way. The "brass" in this case are just the people who pay to host the site and those who want to make sure it is stable, secure, and maintainable.

Basically the Stylus users talking about starting their own site (which is exactly how this site came about with the collapse of userscripts.org) could submit a PR to OUJS with the changes to incorporate a UserCSS hosting service into this site. They could even user a different url and forward it the the relevant UserCSS homepage on this site. They could even use a slightly different template and style on the pages relevant to UserCSS. The point is: this site is similar, open source, and already built.

I find it disappointing that the creator of Stylish and userstyles.org (who is also the creator and owner of greasyfork.org) decided to sell off userstyles.org and abandon the community.

Re: @sizzle:

The only thing I was really opposed to hosting was media (graphics, audio, videos, etc.).

data: URI's could pose a DMCA risk. The size, if accepted on the site, would need to be severely limited e.g. the current 1MiB upload size would need to be much, much, much, smaller. I do realize that a .user.js can do CSS as well... part of the reason why .user.js userscripts and .js libraries has this current limit from my vantage point.

This would have to be a content license since code licenses used for scripts and libraries only apply to code not content like CSS (@Marti can let know if I'm wrong about this).

You're not incorrect (in the context of images/sounds/etc. is content but not CSS code itself ... see @license). Again there is a risk of plain copyright infringement vs. fair use on derivative media works. Most artists/photographers are quite protective of their works (know this first hand with my photographer colleagues) which is why I continually mention attribution via leveraging of copyright with licensing. Not everyone listens unfortunately and there is stubbornness on both sides of that coin.

In general I've thought about this off an on since it was suggested and the domain name of OUJS doesn't really lend itself to "OpenUserCSS". DRM is a continual thorn in the foot as well. Some sort of linkage to another site that actually hosts the CSS could be an option to think about e.g. similar to how Stylish wrapped the CSS into a .user.js but then we would need to maintain that. I would strongly suggest a separate database and connection to isolate what we could potentially offer for protection of the .user.js sources if we do store other resources.

I'm not entirely opposed but I'm not entirely sold on the idea. An issue created first on development and then a PR could be tested for sure to see how it would be implemented. It would be a long term PR, at least for me, to attempt to find most of the ways that it could be exploited.

If we started getting a lot of user styles uploaded here we could add a direct link to that filter in the toolbar.

Quite honestly with the advent of ES6+ Template Literal Strings putting CSS directly into a tag and injecting in via a .user.js is fairly simple in a .user.js and very clean. So I'm not sure where the advantage is other than some symmetry.

With GM (webbymonkey specifically) being crippled (incomplete) for a while it's going to get interesting when legacy add-ons get munched by Firefox changes here in a few short months.

You're right Marti that OUJS probably isn't the best home for UserCSS. But I really feel for that community since they got shafted even worse the UserJS community. We dealt with the loss of a long time home that was neglected and slowly collapsed. Their home got sold right out from underneath to some company just looking to make a buck from the traffic.

At the very least the creators of this OpenUserCSS could fork our code base and make the desired modifications for hosting UserCSS and run their own instance.

As long as they were truly free and open source, I would be happy to collaborate with them to link our register user bases and have prominent links between sites.

Essentially both sites would have to handle new registrations on their own, but we could set up a mechanism to authenticate registered users on one site to be registered on the other.

Basically, if I went to OUCSS and typed in my username (usernames from both sites should be reserved on the other but nothing should be created automatically) to login, I should be created as a user there, and hopefully on my profile it would show I have no UserCSS but list my UserJS (or at least a link to my scripts on OUJS). The actual links to the listed scripts should point to the pages on OUJS. Samething goes for a user registered on OUCSS logging into OUJS for the first time.

This does require mirroring moderation removal of users on the site the user originally registered on. Of course you can always ban users that registered on the other site, and whether this removes the user from the origin site is up to them. We'd probably mark the user for moderation review.

data: URI's could pose a DMCA risk.

Almost all userstyles are below 100KB (ref) and therefore limit their use of URI encoded images due to the restrictions set by USO. You could impose a no-URI restriction if it is that much of a concern.

putting CSS directly into a tag and injecting in via a .user.js is fairly simple in a .user.js and very clean

There are a few reasons it is better to use a style-specific addon versus adding the style through a userscript

  • Even though you can run a userscript at document-start there may still be a FOUC. We've encountered this problem with our GitHub-Dark Script userscript, but we've never had a problem with our GitHub-Dark userstyle.
  • Stylesheets injected using GM_addStyle are appended to the <head> and even styles using an !important flag may be overridden by the default style if it also uses the flag.
  • Stylus manages this problem by immediately adding the style, then moving the style after the closing body tag once the document has completed loading.

I actually just converted all of my UserCSS to UserScripts so that I could only have TamperMonkey installed and not Stylish. Perhaps instead of making a separate UserCSS site, just make a "Convert this CSS to a UserScript" function that allows people to paste in CSS and easily make it into a UserScript.

Conversion is a hidden feature of userstyles.org. Let's say you have this URL:

https://userstyles.org/styles/152417/dashed-green-outline-on-focused-element

The URL to generate a userscript is:

https://userstyles.org/styles/userjs/152417/dashed-green-outline-on-focused-element.user.js

As a bookmarklet:

javascript:var parts=location.href.split('/styles/'); location.href=parts[0]+'/styles/userjs/'+parts[1]+'.user.js'; void 0;

You can convert a few to see the pattern the site uses. It hink you need to manually generate @include/@match for styles that use a regex with @-moz-document.

Re: @SniperFox:

... just make a "Convert this CSS to a UserScript" function that allows people to paste in CSS and easily make it into a UserScript.

May be reasonable idea for one of the the default templates at #1232. Depending on the state of Greasemonkey (GM) 4 this may prove to be a challenge getting something that works in every current .user.js engine for each current browser (some bleed over with Fx ESR and difference between Tampermonkey (TM) and GM). We would also be open to a help document page if someone is willing to write one on best practices.

As mentioned by @jscher2000 there are additional ways of doing that currently before we get that issue implemented.

Re: @jscher2000:

It's no longer a hidden feature. They have a "Install style as userscript" link right on every page just above "Discussion".