-
Notifications
You must be signed in to change notification settings - Fork 302
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.
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
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.
A: Yes, use the meta routine.
Multiple forms exist for various purposes:
-
.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. -
.meta.json
- This is the modern JSON usage that outputs the information we collect from the metadata blocks. -
.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 aFAIL
status and then update checks 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 is a permanent state unless the configuration file in the engine is modified by hand.
- Use of the url form... with
-
https://openuserjs.org/install/username/scriptname.user.js plus the Userscript engine sending out the request header.
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.
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.