Jabbertoon link formats

Jabbertoon's pages read instructions from the part of a link after the # sign, which the browser never sends to a server. A link can open a shipped move or a ready-made character by name, or a move or a character of your own carried in the link as a share code. This is the public edition of the link reference.

1. The rules

  • Fragments only. Everything after # stays in the browser: it is never sent to jabbertoon.com, so nothing a person makes is uploaded by sharing it. A link has keys joined by &: #ch=dog&slot=B. Values are written with encodeURIComponent where they need it (share codes never do).
  • Nothing changes until all of it is right. An unknown key, an unknown value, a damaged share code or a key given twice shows a message, changes nothing, and the page keeps working. Names are looked up as the tools' own names only: #ch=__proto__, #ch=constructor or #look=toString are unknown values, not tricks.
  • A link is applied once. After the studio applies a link it takes it off the address, so a reload does not apply it again. A link that replaces a character says so and offers Undo.
  • The kept cartoon first. When the studio has a cartoon kept in this browser, it asks "Keep going with your cartoon?" first and applies the link after the answer. Coming back from the block editor or the character maker, it keeps going without asking; a reload after that asks again.
  • Pack slugs in #p= are the last part of a move's pack id (c4c:beh:sadidle is sadidle), not the names of the move pages.
  • What plays from a link today: a move and a character. A move plays in the block editor (and in the studio, as a character's move); a character opens in the studio or the character maker. No link plays a scene or a whole cartoon yet: today such a code opens its blocks in the block editor, to read, change and share, and the studio says so in one message that offers that, once.

2. The studio, /studio/

linkwhat it does
#p=<move>that move (a shipped one, by its pack slug) becomes character A's move in line 1
#ch=<template>that ready-made character goes in slot A: person, kid, dog, cat, bird, monster
#ch=<template>&slot=Bthe same, in slot B (slot=A is the default)
#my=<key>&slot=A or &slot=Bthat entry of My characters (kept in this browser; its key is local:char:<12 hex>) goes in the slot
#c=<code>a character code: the character goes in slot A (or &slot=B) and into My characters; a move code: the move goes into My moves and becomes character A's move in line 1; a scene or cartoon code: one message, which says it does not play from a link yet (§1) and offers once to open its blocks in the block editor; nothing changes
#look=<look>the shape characters take that look: flat, outlined, soft, storybook, bold, crayon
#clearopens "Clear my things from this browser" (it asks before it removes anything)
?look=<look>older links: the characters start in that look

#p= may come with a character (#p=wag&ch=dog), and so may a move's code (#c=<move code>&ch=dog): the character goes in first, then the move is that character's in line 1 (with &slot=B, the character goes in slot B and the move is still character A's). A link names at most one character and at most one move. slot= goes with a character: a link with a slot and no character (#p=walk&slot=B, #look=crayon&slot=B) changes nothing and says why. A character a link puts in a slot faces the other slot's character (in slot B it faces left, toward A, unless the first line has them the other way round); "Turn around" turns it.

3. The block editor, /blocks/

linkwhat it does
#c=<code>opens that move as blocks, playing on the stage; a scene's or a cartoon's code opens its blocks to read, change and share (the stage plays moves only, §1)
#p=<move>opens that shipped move as blocks
#ch=<template>puts that ready-made character on the stage, in the Outlined look
#my=<key>puts that entry of My characters on the stage
#for=A or #for=Bputs character A (or B) of the cartoon this browser keeps on the stage, as the studio draws it: its look, its colours, the way it faces. The studio's "Make my own move" links this way (#p=walk&for=A), and keeps the cartoon first. A drawing, a photo, an emoji or a built person cannot go on this stage.

A move and a character go together: /blocks/#p=wag&ch=cat. The whole link is checked first: when any part is unknown or damaged (#p=walk&ch=nope), a key is not one of these five (#look=crayon, #slot=B), or a key is given twice (#ch=dog&ch=cat), neither the blocks nor the stage change, and the editor says why under the stage. A link names at most one character (ch, my or for) and at most one move (c or p). While you build, the editor keeps the address at #c=<the code of your blocks>, so the address is always a link to what you see.

4. The character maker, /create/

linkwhat it does
#ch=<template>start from that template
#c=<character code>open that character
#my=<key>edit that entry of My characters
#for=A or #for=Bthe slot that "Use in my cartoon" fills in the studio
#look=<look>the new character's look

5. Share codes

A share code is the object's JSON, as UTF-8 bytes, in base64url (A-Z a-z 0-9 - _) with the = padding left off. The tools write the canonical JSON (keys sorted, no spaces, numbers in their shortest form; the same rule as a pack's content_hash), so the same program always gives the same code; any JSON opens. A code holds one of:

  • a block program: {"v": 1, "kind": "behaviour", "scripts": [...]} (a move), or of kind "scene" or "cartoon"; the format is the block language spec. Every code the block editor ever wrote stays valid;
  • a character: {"type": "character", "name": "...", "content": {...}}, where content is a character pack's content (the pack format, "character"). It is checked in full before anything changes.

Making a code in JavaScript:

const bytes = new TextEncoder().encode(JSON.stringify(program)); // any JSON opens
let bin = '';
for (const b of bytes) bin += String.fromCharCode(b);
const code = btoa(bin).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
const link = 'https://jabbertoon.com/blocks/#c=' + code;

In Python:

import base64, json
code = base64.urlsafe_b64encode(json.dumps(program, separators=(",", ":")).encode("utf-8")).decode().rstrip("=")
link = "https://jabbertoon.com/studio/#c=" + code

Reading one: put the = padding back, turn - into + and _ into /, decode base64, then UTF-8, then JSON.

A ready-made character is best linked by name (#ch=dog): its full code is about 20,000 letters. A character of your own travels in its code.

6. Examples to copy

  • The studio with the dog in slot B: https://jabbertoon.com/studio/#ch=dog&slot=B
  • The studio with character A doing "Sad" in line 1: https://jabbertoon.com/studio/#p=sadidle
  • The studio with the shape characters in the Crayon look: https://jabbertoon.com/studio/#look=crayon
  • The block editor with "Happy wag" on the cat: https://jabbertoon.com/blocks/#p=wag&ch=cat
  • A move, "Little hop" ({"kind":"behaviour","name":"Little hop","scripts":[{"body":[{"amp":40,"every":0.6,"op":"hop"}]}],"v":1}), in the studio: https://jabbertoon.com/studio/#c=eyJraW5kIjoiYmVoYXZpb3VyIiwibmFtZSI6IkxpdHRsZSBob3AiLCJzY3JpcHRzIjpbeyJib2R5IjpbeyJhbXAiOjQwLCJldmVyeSI6MC42LCJvcCI6ImhvcCJ9XX1dLCJ2IjoxfQ
  • The same move as blocks: https://jabbertoon.com/blocks/#c=eyJraW5kIjoiYmVoYXZpb3VyIiwibmFtZSI6IkxpdHRsZSBob3AiLCJzY3JpcHRzIjpbeyJib2R5IjpbeyJhbXAiOjQwLCJldmVyeSI6MC42LCJvcCI6ImhvcCJ9XX1dLCJ2IjoxfQ
  • A character of its own, "Blobby", a round pink body with a face and no legs, in slot B: https://jabbertoon.com/studio/#c=eyJjb250ZW50Ijp7ImZvb3RwcmludCI6NjAsImhlaWdodCI6MTIwLCJraW5kIjoiY3VzdG9tIiwibGVncyI6MCwibG9vayI6Im91dGxpbmVkIiwidHJlZSI6eyJjaGlsZHJlbiI6W3siY2hpbGRyZW4iOlt7ImZhY2UiOnsiYnJvd3MiOnRydWUsImV5ZVIiOjksImV5ZVgiOjIyLCJleWVZIjotMTQsIm1vdXRoSCI6MTQsIm1vdXRoVyI6NDAsIm1vdXRoWSI6MTh9LCJpZCI6ImhlYWQiLCJwb3MiOnsieCI6MCwieSI6LTEwfSwicm9sZSI6ImhlYWQifV0sImZpbGwiOiIjZmY3YWI2IiwiaWQiOiJib2R5IiwicG9zIjp7IngiOjAsInkiOi02MH0sInJvbGUiOiJ0b3JzbyIsInNoYXBlIjp7ImgiOjEyMCwidHlwZSI6ImVsbGlwc2UiLCJ3IjoxMjB9fV0sImlkIjoicm9vdCIsInJvbGUiOiJyb290In19LCJuYW1lIjoiQmxvYmJ5IiwidHlwZSI6ImNoYXJhY3RlciJ9&slot=B

It never uploads anything, never makes an account, never asks for a name or an age, and never keeps anything outside this browser. A character or a move that arrives by a link is kept only in this browser's My characters or My moves, until "Clear my things from this browser" removes it.