More fun with the monkey
Cory Doctorow points to America from the Great Depression to World War II: Color Photographs from the FSA-OWI, 1939-1945, with the following observation:
Unfortunately, the organizational back-end for this is so primitive (especially in comparison with modern image-sharing and organizing sites like Flickr) that it, too, seems to hail from 1939-1945, making the site a real pain to navigate and use.
Thanks to Greasemonkey, great content spoiled by poor navigation is a solvable problem.
americanmemoryfixer.user.js includes the following improvements:
- Changes the colour scheme to black-on-white, and the typeface to Verdana.
- Removes all table borders.
- Adds headings to some pages, and fixes various title tags.
- Sets the default gallery view to be a set of thumbnails, rather than a list of names.
- Displays a large image (as opposed to a thumbnail) when you view a photograph.
The scariest hack in the script is the way in which subject page titles are passed around. In the current site, if you visit a category page (such as Sharecroppers) the title of the category is not displayed on the page—even though it has been passed as a parameter in the URL. If you click a link (say to the Galley thumbnail page) the information in the URL is lost as well.
My solution was to extract the subject from the URL on that first page, then rewrite the other links to include an additional “&subject=Sharecroppers” parameter. This new parameter is ignored by the CGI scripts that power the site, but my Greasemonkey script watches out for it on subsequent pages and uses it to display a title (and further propagate it to other links on the page). It’s not a very robust solution, but it’s good enough.
There’s plenty of scope for further improvement—if you want to use my script as a starting point, please feel free.
More recent articles
- Weeknotes: Parquet in Datasette Lite, various talks, more LLM hacking - 4th June 2023
- It's infuriatingly hard to understand how closed models train on their input - 4th June 2023
- ChatGPT should include inline tips - 30th May 2023
- Lawyer cites fake cases invented by ChatGPT, judge is not amused - 27th May 2023
- llm, ttok and strip-tags - CLI tools for working with ChatGPT and other LLMs - 18th May 2023
- Delimiters won't save you from prompt injection - 11th May 2023
- Weeknotes: sqlite-utils 3.31, download-esm, Python in a sandbox - 10th May 2023
- Leaked Google document: "We Have No Moat, And Neither Does OpenAI" - 4th May 2023
- Midjourney 5.1 - 4th May 2023
- Prompt injection explained, with video, slides, and a transcript - 2nd May 2023