Skip to content

Instantly share code, notes, and snippets.

@ArneS
Last active June 17, 2025 10:22
Show Gist options
  • Save ArneS/3531ae48cc38a8433328b3da95ea8c89 to your computer and use it in GitHub Desktop.
Save ArneS/3531ae48cc38a8433328b3da95ea8c89 to your computer and use it in GitHub Desktop.
Bookmarklet for automatically giving kudos to all events in your Strava feed

Give kudos to everything in your feed

When run from a bookmarklet (aka javascript bookmark) this code gives kudos to all entries in your feed. The "compiled" bookmarklet is maintained at https://bookmarkl.ink/ArneS/3531ae48cc38a8433328b3da95ea8c89

To use

  1. Add bookmarklet as bookmark to your browser via https://bookmarkl.ink/ArneS/3531ae48cc38a8433328b3da95ea8c89
  2. Navigate to your strava feed https://www.strava.com/dashboard?num_entries=100
  3. Click the bookmarklet

Derived from https://gist.github.com/Jonathan-Mckenzie/5d9a585f9d9a22ad115d14fa60a019e7

const maxButtons = 200; // Its weird going too far back
let delay = 25; // ms delay between clicks
var buttonsToBeClicked = 0;
const poppy = function() {
const popup = document.createElement("div");
popup.innerHTML = `
<div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center;">
<div style="background: white; padding: 20px; border-radius: 5px; text-align: center;">
<h2 style="margin: 0 0 10px;">The Kudoz Machina</h2>
<p id="km"></p>
<p id="km2"></p>
<button onclick="this.parentElement.parentElement.remove()">oki!</button>
</div>
</div>
`;
document.body.appendChild(popup);
}
const wr = function(t, id) {
document.getElementById(id).innerHTML = t
}
poppy()
setTimeout(() => {
let allButtons = document.querySelectorAll('button:where([data-testid="kudos_button"])');
if (allButtons.length > 0) {
wr(`Yay - found ${allButtons.length} buttons`, 'km');
let buttons = Array.from(allButtons).slice(0, maxButtons);
buttons = buttons.filter(button => ['Be the first to give kudos!', 'Give kudos'].includes(button.title));
if (buttons.length == 0) {
wr(`No buttons to lick`, 'km2');
} else {
buttons.forEach((node, i) => {
buttonsToBeClicked++;
setTimeout(() => {
wr(`Kudozing item ${i + 1} of ${buttonsToBeClicked}`, 'km2');
node.click();
if (i + 1 == buttonsToBeClicked) {
wr(`Gave ${buttonsToBeClicked} kudoz`, 'km2');
}
}, delay * (i + 1));
});
wr(`Giving ${buttonsToBeClicked} kudoz for you`, 'km');
}
} else {
wr("No buttons found")
}
}, 200)
//bookmarklet_title: Kudoz
//bookmarklet_about: Bookmarklet for giving all your friends kudos on Strava
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment