Skip to content

Instantly share code, notes, and snippets.

View jonashw's full-sized avatar

Jon Wilson jonashw

  • Yolo County, California
View GitHub Profile
@jonashw
jonashw / Bookmarklet-Maker.js
Last active June 11, 2026 23:04
Bookmarklet Maker
// ==UserScript==
// @name Bookmarklet Maker
// @namespace http://tampermonkey.net/
// @version 2026-06-11
// @description A lean and mean JavaScript-only SPA that facilitates the creation of bookmarklets from JavaScript code. Inspiration: https://caiorss.github.io/bookmarklet-maker/. Fun fact! You can package this tool *as a bookmarklet* using the tool itself ;)
// @author Jon Wilson <2jonwilson@gmail.com>
// @source https://gist.github.com/jonashw/83be75a1cd63537259070a430395d486
// @match https://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
@kcsluis
kcsluis / uscities.csv
Created August 9, 2019 18:00
US Cities
We can't make this file beautiful and searchable because it's too large.
"city","city_ascii","state_id","state_name","county_fips","county_name","lat","lng","population","population_proper","density","source","incorporated","timezone","zips","id"
"Prairie Ridge","Prairie Ridge","WA","Washington","53053","Pierce","47.1443","-122.1408","","","1349.8","polygon","False","America/Los_Angeles","98360 98391","1840037882"
"Edison","Edison","WA","Washington","53057","Skagit","48.5602","-122.4311","","","127.4","polygon","False","America/Los_Angeles","98232","1840017314"
"Packwood","Packwood","WA","Washington","53041","Lewis","46.6085","-121.6702","","","213.9","polygon","False","America/Los_Angeles","98361","1840025265"
"Wautauga Beach","Wautauga Beach","WA","Washington","53035","Kitsap","47.5862","-122.5482","","","261.7","point","False","America/Los_Angeles","98366","1840037725"
"Harper","Harper","WA","Washington","53035","Kitsap","47.5207","-122.5196","","","342.1","point","False","America/Los_Angeles","98366","1840037659"
"Telma","Telma","WA","Washington","53007","Chelan","47.8432","-1
@caseywatts
caseywatts / bookmarkleting.md
Last active June 24, 2026 17:15
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.