Fork me on GitHub

Bookmarklets

Usage

  1. Choose 👀 a bookmarklet
  2. Familiarize yourself 💾 with its source
  3. Tweak paramteres 🛠 if needed
  4. Test it 🧪 by clicking link
  5. Drag'n'drop ⭐️ the link onto your bookmarks bar

# Hello, World

Alerts "Hello, World"

() => {
  window.alert("Hello, World!");
}

# Morse Keyboard

Use keyboard instead of mouse for playing Morse code sounds on https://morsecode.world/international/morse.html

() => {
  const tiles = [...document.querySelectorAll(".morse.tile")].reduce((map, tile) => {
    map[tile.innerText.toLowerCase()] = tile;
    return map;
  }, {});
  window.addEventListener("keypress", (e) => {
    var _a;
    (_a = tiles[e.key]) == null ? void 0 : _a.click();
  });
}

# PERT β

Calculates β average for Pessimistic, Realistic, and Optimistic estimations

(options) => {
  const [o, r, p] = window.prompt(options.prompt, "").trim().split(/[^\d]+/).map((s) => parseInt(s, 10));
  const dec = 10 ** parseInt(options.precision, 10);
  const beta = Math.round(dec * ((p + 4 * r + o) / 6)) / dec;
  window.alert(`PERT \u03B2 = ${beta}`);
}