Last active
January 16, 2026 20:38
-
-
Save jimniels/1792a7363f3da7df9925632efc39c2c8 to your computer and use it in GitHub Desktop.
Bookmarklets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Bookmarklets | |
| // You probably have to collapse these into a single line | |
| // To then copy/paste into browser | |
| // | |
| // Open current Icon Gallery post in VSCode | |
| // e.g. visit an icon's post page on iosicongallery.com and run this | |
| javascript:(function () { | |
| try { | |
| const siteId = window.location.host.split('.')[1].replace('icongallery', ''); // ios, macos, etc. | |
| const slug = window.location.pathname.split('/')[2]; // runbuds-2026-01-06 | |
| const id = slug.replace(/^(.*)-(\d{4}-\d{2}-\d{2})$/, '$2-$1'); // runbuds-2026-01-06 | |
| const vscodeHref = `vscode://file/Users/jimnielsen/Sites/icongallery/sites/${siteId}/icons/${id}.json`; | |
| window.location.href = vscodeHref; | |
| } catch (error) { | |
| console.error(error); | |
| alert('Failed to open. Check console for details.'); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment