~$ cat pingr.md
Pingr

Pingr

stale
#vue #discord #april-fools

About#

Pingr is a small browser tool built for April Fools. You upload your Discord server's icon, it composites a ping badge onto it, and you get back a PNG. Swap it into your server settings and every member will see an unread ping that doesn't exist. No server, no install, no dependencies beyond Vue and the Canvas API.

[*] Tip
Works best on servers where you're an admin obviously. Also works on people who leave their DMs open.

Features#

  • Drag and drop or click-to-upload any server icon (PNG, JPG, WEBP)
  • Composites the ping overlay at 512x512 using the browser Canvas API
  • Preview before downloading, with a Discord-style squircle border radius
  • One-click PNG download
  • "why?" button that explains the bit
  • Fully client-side, nothing leaves your browser

Technical Highlights#

  • Image compositing is done entirely with <canvas> - no image processing library needed
  • The overlay (ping-overlay.png) is a pre-made 512x512 PNG with the badge already positioned in the bottom-right corner, so placement is just drawImage stacked twice
  • Components: AppHeader, WhyModal, DropZone, ResultPreview - App.vue only holds state and the compositing logic
  • Object URLs are revoked on reset and re-process to avoid memory leaks
js
ctx.drawImage(icon, 0, 0, SIZE, SIZE);
ctx.drawImage(overlay, 0, 0, SIZE, SIZE);

canvas.toBlob((blob) => {
  resultUrl.value = URL.createObjectURL(blob);
}, "image/png");
Why a pre-positioned overlay instead of drawing the badge programmatically?

Keeps things dead simple. The overlay is just a transparent PNG with the badge sitting where Discord puts it. No math, no coordinate logic, no font rendering. Drop it on top and you're done. If the badge position ever needs to change, swap the PNG.


Built in an afternoon on April 1st. It does exactly one thing.