Welcome to Sniplets.org, where the AI-assisted coding meets the simplicity of bookmarks. Sniplets -- also known as "bookmarklets" and before that "favelets" -- are small pieces of JavaScript code that you can save as bookmarks in your browser. These nifty tools allow you to enhance and personalize your web browsing experience with the click of a button. Since they tend to be fairly small and simple, they are a perfect match for ChatGPT (or Claude), since even coding newbs can create useful utilities by telling ChatGPT to code them up, and then quickly using this site to convert your code into a useful sniplet.

What Exactly Are Sniplets?

Sniplets are essentially bookmarks with superpowers. Instead of leading you to a webpage, activating a sniplet executes a JavaScript code snippet that can modify the current page you're viewing, add new functionalities, or automate common tasks. From changing the appearance of a webpage to extracting information or automating repetitive actions, sniplets make the web a playground for innovation and convenience. And they are perfect for introducing you to coding.

We also consider Sniplets to be AI created code, typically. They don't have to be, but the tools here are all about coding in a chatbot and quickly running it in the ChatGPT page (see the Sniplet Tools on ChatGPT page sniplet below) and then running it in any page you want.

What some example Sniplets?

Here's a few that range from super-handy useful ones, to

starter ChatGPT prompt
Run this on a ChatGPT page to pre-prompt it with instructions for doing JavaScript stuff such as adding elements, etc using a simple library so it goes smoothly. You can add more to it afterwards, and then hit Enter to send the prompt.

Sniplet tools on ChatGPT page
Run this on a ChatGPT page so you can build Sniplets right inside the ChatGPT page

Draw SVG curves on page
Creates a curve drawer tool, that you can use to circle things etc. Makes pretty SVG curves with a shadow. Press r, o, y, g, b, p, or m to change the color, u to undo, x to quit.

fancy, animated version of flip images
Makes them spin around in perspective to random 3d rotation. Wait 5 seconds to run again if you want to restore to normal.

drop image (or svg) into page
Makes a button on page you can drag and drop image to (from your local file system) to make it appear on current page. Now supports SVGs too.

show images on page in new tab
Opens a new browser tab that contains all images and SVGs on the current page, sorted by size

user interface demo
Pops up a Panel (element with close button --- hover mouse in upper right) that has various UI controls on.

more sophisticated Panel object
If you have run this on a page, and then create a Panel object (such as with the UI test sniplet), the Panel will be draggable and resizable and have pretty SVG controls.

A Brief History

The concept of sniplets has been around since the earliest days of the web. They were invented by Brenden Eich, the creator of JavaScript, in 1995. These tools embody the spirit of web innovation, allowing users to interact with web content in ways that go beyond passive browsing. Their simplicity and power have made them a favorite among coders and non-coders alike, offering a glimpse into the creative potential of web technologies.

I've had my own very popular browser gizmo, Aardvark, available since 2005, which is credited with inspiring the Element Inspector in Firebug and later Chrome. It was first a Firefox extension, but in 2008 I decided to make it a sniplet when I got tired of browsers changing their interfaces and breaking it. Making it a sniplet made everything simpler. Aardvark still works (and I use it all the time), but I am currently in the process of giving it tons of new bells and whistles, using ChatGPT and making instructional videos along the way. Stay tuned.

Why Trust Is Key

While sniplets open a world of possibilities, it's important to approach them with a mindset of safety and understanding. Not all code is created equal, and running scripts from unknown sources can pose risks. That's why at Sniplets.org, we encourage you to learn and understand the code behind the sniplets you use. Our platform is designed with beginners in mind, aiming to demystify coding and make it accessible to everyone. However, always ensure that the code you run is from a trusted source or is understood by you. ChatGPT is not at all likely to give you sneaky or malicious code, of course, unless you actually tell it to. Any sniplets you'll find on our site are verified safe. But if you paste in code from somewhere other than ChatGPT.... ya gotta be careful, ok?

Learn and Create

For those new to coding or looking to deepen their understanding, Sniplets.org is more than just a repository of tools. It's a learning platform. We're in the process of creating a series of YouTube lessons designed to teach you how to code, especially using ChatGPT, and use sniplets to immediately turn even the smallest of programs into useful and fun things you can use every day. Or for that matter to just make some eye candy to amuse your brain. These tutorials will guide you from the basics of JavaScript by crafting your very own sniplets, all by just talking to your computer in plain English. We hope to empower you to make the web work for you in new and exciting ways.

Stay tuned for our upcoming YouTube series, and dive into the world of sniplets today. Discover how a little code can make a big difference in your browsing experience.

© 2024 rob brown and sniplets.org (rjbrown at gmail)