About / Frequently Asked Questions

In this FAQ here are some of the most common questions and answers asked, some more silently than others, about OpenUserJS.org.

Q: With markdown why does my quoted text merge with my response?

A: Place two line breaks in between your quote and reply like this:

> Something to be quoted

This is my reply

which renders as:

Something to be quoted

This is my reply

... instead of:

Something to be quoted
This is my reply

Q: How do I ensure the correct syntax highlighting of my code snippets?

A: Use markdown like these:

Example 1:

``` js
var thisIsJavascript = "yahoo!";
```

... which renders as:

var thisIsJavascript = "yahoo!";

Example 2:

``` json
{"json": "rules"}
```

... which renders as:

{"json": "rules"}

... instead of:

{"json": "rules"}

Example 3:

``` css
body {
  background-color: black;
}
```

... which renders as:

body {
  background-color: black;
}

... instead of:

body {
  background-color: black;
}

The smaller the code snippet, or having a flawed Code snippet, the more likely it will automatically pick the wrong highlighting with code fences, or worse no highlighting... so it is best to recommend coercing a snippet to the correct type.

Q: Does OpenUserJS.org have meta?

A: Yes, use the meta routine.

Multiple forms exist for various purposes:

  1. .meta.js - This is the traditional // @ delimited usage that outputs some of the metadata blocks items from a userscript for updating in userscript engines such as Greasemonkey and is used with @updateURL.
    • https://openuserjs.org/meta/username/scriptname.meta.js
      • This is the preferred route and goes directly to the necessary items needed for updating. This route is currently unmanaged. If you want your update checks faster most of the time this is the route to choose.
    • https://openuserjs.org/install/username/scriptname.meta.js
      • This is the legacy route and indirectly goes to the necessary items needed for updating. This route is currently managed. If you want your script update checks to potentially not come during high traffic times this is the route to choose.
    • One of these is currently required when OpenUserJS is in lockdown mode. If any script points to an OUJS .user.js url it will not be served. If it is absent it will not be served. Occasionally a script and/or .user.js engine might put out a bugged version and in order to ensure minimal site disruption OUJS may optionally toggle into lockdown mode. Hopefully these instances will be few but there is existing precedence for this use case. Please see About for current site status and your Author Tools panel on each of your scripts.
    • You must choose. But choose wisely, for as the true .meta.js will bring you life, a false one will take it from you.
  2. .meta.json - This is the modern JSON usage that outputs the information we collect from the metadata blocks.
  3. .user.js + text/x-userscript-meta - Modern Userscript engines sometimes may send a special header out in order to retrieve just the meta.
    • https://openuserjs.org/install/username/scriptname.user.js plus the Userscript engine sending out the request header.
      • Use of the url form... with updateURL in the UserScript metadata block... is highly discouraged. The reason why is while your browser is open, and if your internet goes offline (or the target site is offline) for any reason this could toggle the userscript engine into a FAIL status and then update checks may pull full script source. This is considered bad etiquette for Authors and your users. Some portable devices may incur additional charges for extra bandwidth used so please be considerate. Usually this can be a permanent state unless the configuration file in the engine is modified by hand.

The username and scriptname "folders" are usually specially formattted and can be URIComponent encoded depending on the Unicode usage with name in the UserScript metadata block. This formatting can sometimes be referred to as a "slug" but usually those types of urls are not URI or URIComponent encoded and are strict ANSI. See the href attribute (usually copy link, or similar, in a right click context menu) on the blue Install button for the current encoding for the values on a Userscripts home page.

A Userscript Unit Test is available to demonstrate and test these features at oujs - Meta View for a graphical representation of these meta routines.

Q: Is there a way to not to count script updates with this sites install counter?

A: Yes, use the raw source route like this in the UserScript metadata block:

// @updateURL https://openuserjs.org/meta/username/scriptname.meta.js
// @downloadURL https://openuserjs.org/src/scripts/username/scriptname.user.js

... notice the src/scripts p.a.t.h/t.o instead of install.

As an added advantage and incentive to utilizing this source route (URL path) with @downloadURL the "Too Many Requests" period is divided by a sweet factor. In other words this route is currently "less" managed than the install route. This UserScript metadata block key is not currently required but highly encouraged especially due to faulty .user.js engine updaters.