Skip to content

Instantly share code, notes, and snippets.

@gapmiss
gapmiss / count.js
Created April 4, 2025 21:48 — forked from ashtonmeuser/count.js
Example bookmarklets for bookmarkl.ink
//bookmarklet_title: Word Frequency
//bookmarklet_about: Display the top five most common words on a webpage. Drag the bookmarklet to your bookmarks bar to use it anywhere! If the word hippo shows up a lot, hippo should have a high occurrence (hippo hippo HIPPO).
var counts = { };
var text = document.body.innerText || document.body.textContent || '';
var words = text.split(/\b/).filter((word) => {
return word.match(/^\w+$/) !== null;
});
words.forEach((word) => {
<!DOCTYPE html>
<html lang="en" class="">
<head>
<title>Javascript_starter</title>
<meta name="title" content="Javascript_starter" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style id="__livecodes_styles__">
.container,
.container button {
#!/bin/bash
echo $PATH | sed 's/:/\n/g'