JSR is a brand new package repository for "modern JavaScript and TypeScript", launched on March 1st by the Deno team as a new alternative to npm …
I've been experimenting with a tool for generating the content for a weekly Substack newsletter by querying the Datasette API for my blog and assembling HTML for the last week of content. …
The San Francisco Microscopical Society has some extremely high resolution scanned images - one of them is a 1.67GB PNG file with a 25,088 × 17,283 pixel resolution. …
A few notes on JavaScript Date
object, based on trying to do some basic things with them in Observable notebooks. …
Pasting this code into a DevTools console should load Tesseract.js from a CDN, loop through every image loaded by that page (every PNG, GIF, JPG or JPEG), run OCR on them and output the result to the DevTools console. …
Lit 2 stable was released today, offering a tiny, feature-full framework for constructing web components using modern JavaScript. …
I needed this for VIAL issue 722. I decided to disable form submissions for two seconds after they are submitted, to protect against accidental double submissions without risk of unexpected issues that could cause the form to be permanently disabled even though it should still be able to submit it. …
For a Django application I'm working on (this issue) I have a form that can be quite a long way down the page. …
I wanted to try out Jest for writing JavaScript unit tests, in a project that wasn't set up with package.json
and other NPM related things. …
I added dropdown menus to Datasette 0.51 - see #1064. …
I wanted to change the layout of my blog on mobile screens such that the content from the "Elsewhere" right hand column combined with the main column in the correct order (issue #165). I couldn't find a way to do this in pure CSS without duplicating a bunch of content, so I decided to do it with JavaScript. …
The URLSearchParams
class, in every modern browser since IE 11, provides a sensible API for manipulating query string parameters in JavaScript. I first used it to build Datasette's column action menu, see table.js and issue 981. …
While upgrading CodeMirror in Datasette I figured out how to minify JavaScript using uglify-js
on the command line without first installing any teels, using npx (which downloads and executes a CLI tool while skipping the install step): …
For datasette-leaflet-geojson I wanted to dynamically load some external CSS and JavaScript and then execute some code once they had loaded (issue 14). …
TIL that nodeValue
in the DOM has a size limit! …
I had to figure this out while building datasette-copyable - demo here. …