3Guards your public http vals behind a login page.
4
5
6
7This val use a json web token stored as an http-only cookie to persist authentication.
15
16 // Convert the canvas content to a PNG buffer
17 const buffer = canvas.toBuffer("image/png");
18
19 // Return a response with the PNG image
20 return new Response(buffer, {
21 headers: { "Content-Type": "image/png" },
22 });
23 } else {
11 "defaultCode": "{\n my_param: \"hello world!\"\n}",
12 "code":
13 "{\n origin: '*',\n format: 'json',\n action: 'query',\n generator: 'random',\n grnnamespace: 0,\n prop: 'pageimages|info|extracts',\n inprop: 'url',\n exintro: true,\n rvprop: 'content',\n grnlimit: 5\n}",
14 },
15 "toolName": "request",
2
3
4
5
6
52 icons: [{
53 src:
54 "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQAQMAAADdiHD7AAAAAXNSR0IArs4c6QAAAANQTFRFLf+I56geCQAAABlJREFUeNrtwTEBAAAAwiD7p7bGDmAAABB2CrAAAR3VlIUAAAAASUVORK5CYII=",
55 sizes: "144x144",
56 type: "image/png",
57 }, {
58 "src": "https://placehold.co/192x192.png",
59 "sizes": "192x192",
60 "type": "image/png",
61 }, {
62 "src": "https://placehold.co/512x512.png",
63 "sizes": "512x512",
64 "type": "image/png",
65 }],
66 screenshots: [{
151 return new Response(
152 await fetch(tinyLogomark).then((r) => r.blob()),
153 { headers: { "Content-Type": "image/jpeg" } },
154 );
155 case "/ping":
10
11
12
13
14
20 "https://tusiart.com",
21 "https://tusiart.com/models/595381491993673733",
22 "https://tusiart.com/images/641647408012381047?post_id=641648696498376106",
23 "https://tensor.art",
24 "https://tensor.art/models/595381491993673733",
25 "https://tensor.art/images/651688517816058150?post_id=651693375419913839",
26 ];
27
14Here's a screenshot of what the honeycomb view of a trace from my [connect playing val](https://www.val.town/v/saolsen/connect4_site) looks like.
15
16
17
18
3Just fork this val to install it, and authenticate with your account email.
4
5
6
7
11 let html = `<h1>${valTownInspo.title}</h1>
12 <p>${valTownInspo.description}</p>
13 <a href="https://val.town/${valTownInspo.val}"><img src="${valTownInspo.image}" style="max-width:576px"/></a>
14 <p><a href="https://www.val.town/settings/intervals">Unsubscribe here</a></p>`;
15