Show users exactly what the AI changed before they accept it
AI rewrites look fine until one quietly changes a price. Show users a word-level diff with Accept and Reject in about 30 lines of JavaScript, no library.
Read the full issuefunction diffWords(before, after) {
const a = before.match(/\S+\s*/g) ?? [];
const b = after.match(/\S+\s*/g) ?? [];
const lcs = a.map(() => new Array(b.length + 1).fill(0));
lcs.push(new Array(b.length + 1).fill(0));
for (let i = a.length - 1; i >= 0; i--) {
for (let j = b.length - 1; j >= 0; j--) {
lcs[i][j] = a[i] === b[j] ? lcs[i + 1][j + 1] + 1 : Math.max(lcs[i + 1][j], lcs[i][j + 1]);
}
}
const parts = [];
const push = (type, text) => {
const last = parts.at(-1);
if (last?.type === type) last.text += text;
else parts.push({ type, text });
};
let i = 0, j = 0;
while (i < a.length || j < b.length) {
if (a[i] === b[j]) { push('same', a[i]); i++; j++; }
else if (j === b.length || (i < a.length && lcs[i + 1][j] >= lcs[i][j + 1])) push('del', a[i++]);
else push('ins', b[j++]);
}
return parts;
}
What people say
Marko's newsletter fits my busy schedule. Small, digestible tips that keep me sharp without any extra effort.
One of my favorite newsletters. Modern web dev tips delivered straight to my inbox, every week.
Marko's newsletter is one of my favorite Saturday reads. It's genuinely worth your time.
Marko's advice is rooted in real experience, not theory. Easy to apply and worth following if you want to grow.
Marko taught me to stop over-polishing and start shipping. Result: 3× faster launches. Pure grind mode now. ⚔️
Marko's consultation was full of practical insights I could apply right away. I'd recommend it to anyone.
Marko helped us hit #2 Product of the Day on Product Hunt. His passion for web dev is contagious, a true difference-maker.
Marko completely turned around our social media content strategy. 100% recommend him if you want real results.
Marko is my go-to for social media strategy. He builds branding that actually reaches people with no wasted effort.
Marko shaped my X content strategy from scratch. I went from zero to 250K followers and I'm still growing.
Recent issues
Make your stats count up with zero JavaScript
Static numbers are easy to scroll past. Register one custom property as an integer and CSS counts your stats up from zero, no library and no JavaScript loop.
Your AI chat scrolls wrong. Fix it in 4 lines of CSS
Stop dragging users back to the bottom while the answer streams. Four lines of CSS make your chat follow new text, and stop the moment the user scrolls up.
Highlight search matches without touching the DOM
Stop wrapping search matches in mark tags. The CSS Custom Highlight API paints every match without adding a single element to your page.
Your articles need a "Copy for AI" button
Your readers already paste your articles into AI chats. Give them a clean Markdown copy instead, with one button and about 30 lines of JavaScript.
Stream AI answers word by word in 15 lines
Stop making users stare at a spinner while your AI feature thinks. Stream the answer word by word with 15 lines of JavaScript, no library, in every modern browser.
Let AI agents use your site with 3 HTML attributes
AI agents guess their way through your UI. Add 3 HTML attributes to your search form and they call it like a function instead. No library, no backend.












