Skip to content

Instantly share code, notes, and snippets.

@kicktraq
Last active January 26, 2026 10:57
Show Gist options
  • Select an option

  • Save kicktraq/efe182e0c44f4f80ae6db59c01bbb537 to your computer and use it in GitHub Desktop.

Select an option

Save kicktraq/efe182e0c44f4f80ae6db59c01bbb537 to your computer and use it in GitHub Desktop.
Ever wonder how much you've spent on KS? Yeah, don't do this on purpose if you are a KS addict.
// ************
// this calculates an estimated amount you have actually paid to all projects on Kickstarter (apologies in advance if this hurts your soul)
//
// login, and visit this page: https://www.kickstarter.com/profile/backings
// keep clicking "show more pledges" in the "successfully pledged" section until the button disappears
// paste the following in your console
// ************
// build a quick and dirty currency echange index
var exchangeArray = {
"$": 1,
"£": 1.31,
"€": 1.17,
"AU$": .74,
"CA$": .76,
"NZ$": .68,
"S$": .73,
"Fr": 1.01,
"¥": .009,
"NOK": .12
};
// setup clean placeholders
var paidTotal = 0;
var paidIndex = 0;
var skippedIndex = 0;
var totalIndex = 0;
// itterate each of our money spans
$("[data-collection_state='collected'] span.money").each(function(){
// get the internal value of each money span
var tmpValue = $(this).text();
// find out where our currency value starts so we can trim off the currency
var currencyPointer = tmpValue.search(/\d/);
var tmpCurrency = tmpValue.substring(0,currencyPointer).trim();
// ensure we have an exchange translation for our currency
if(!(tmpCurrency in exchangeArray)) {
// get our project name
var projectName = $(this).parent().parent().find(".flag-body strong").text();
// explain why we're skipping
console.log("- skipping '" + projectName + "' with currency of " + tmpCurrency);
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
} else {
// ensure we don't have a blank currency, this is
// a quirk from kickstarter with certain currencies like NOK
if(tmpCurrency !== "") {
// ensure we only have the currency portion
tmpValue = tmpValue.replace(/[^0-9\.]/g, '');
// float that bad boy
var tmpTotal = parseFloat(tmpValue);
// convert using our exchange rate lookup
tmpTotal = tmpTotal * exchangeArray[tmpCurrency];
// cumulate our paid placeholder
paidTotal = paidTotal + tmpTotal;
// increment our index of paid projects
paidIndex++;
} else {
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
}
}
// increment our total
totalIndex++;
});
// round for display purposes
paidTotal = paidTotal.toLocaleString('en-US', {style: 'currency', currency: 'USD'});;
// hit us with the damage captain
console.log("\n\n----------\nYou've paid " + paidTotal + " from " + totalIndex + " projects (" + skippedIndex + " skipped)");
// ************
// this calculates an estimated amount you have pledged to all projects on Kickstarter (apologies in advance if this hurts your soul)
//
// login, and visit this page: https://www.kickstarter.com/profile/backings
// keep clicking "show more pledges" in both sections until the button disappears
// paste the following in your console
// ************
// build a quick and dirty currency echange index
var exchangeArray = {
"$": 1,
"£": 1.31,
"€": 1.17,
"AU$": .74,
"CA$": .76,
"NZ$": .68,
"S$": .73,
"Fr": 1.01,
"¥": .009,
"NOK": .12
};
// setup clean placeholders
var paidTotal = 0;
var paidIndex = 0;
var skippedIndex = 0;
var totalIndex = 0;
// itterate each of our money spans
$("span.money").each(function(){
// get the internal value of each money span
var tmpValue = $(this).text();
// find out where our currency value starts so we can trim off the currency
var currencyPointer = tmpValue.search(/\d/);
var tmpCurrency = tmpValue.substring(0,currencyPointer).trim();
// ensure we have an exchange translation for our currency
if(!(tmpCurrency in exchangeArray)) {
// get our project name
var projectName = $(this).parent().parent().find(".flag-body strong").text();
// explain why we're skipping
console.log("- skipping '" + projectName + "' with currency of " + tmpCurrency);
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
} else {
// ensure we don't have a blank currency, this is
// a quirk from kickstarter with certain currencies like NOK
if(tmpCurrency !== "") {
// ensure we only have the currency portion
tmpValue = tmpValue.replace(/[^0-9\.]/g, '');
// float that bad boy
var tmpTotal = parseFloat(tmpValue);
// convert using our exchange rate lookup
tmpTotal = tmpTotal * exchangeArray[tmpCurrency];
// cumulate our paid placeholder
paidTotal = paidTotal + tmpTotal;
// increment our index of paid projects
paidIndex++;
} else {
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
}
}
// increment our total
totalIndex++;
});
// round for display purposes
paidTotal = paidTotal.toLocaleString('en-US', {style: 'currency', currency: 'USD'});;
// hit us with the damage captain
console.log("\n\n----------\nYou've paid " + paidTotal + " from " + totalIndex + " projects (" + skippedIndex + " skipped)");
// ************
// this extracts a list of projects you have backed and generates a CSV for you to download of the data
//
// login, and visit this page: https://www.kickstarter.com/profile/backings
// keep clicking "show more pledges" in the "successfully pledged" section until the button disappears
// paste the following in your console
// ************
// build a quick and dirty currency exchange index
var exchangeArray = {
"$": 1,
"£": 1.31,
"€": 1.17,
"AU$": .74,
"CA$": .76,
"NZ$": .68,
"S$": .73,
"Fr": 1.01,
"¥": .009,
"NOK": .12
};
// setup clean placeholders
var paidTotal = 0;
var paidIndex = 0;
var skippedIndex = 0;
var totalIndex = 0;
// array to hold our project data
var projectData = [];
// iterate each of our money spans
$("[data-collection_state='collected'] span.money").each(function(){
// get the internal value of each money span
var tmpValue = $(this).text();
// find out where our currency value starts so we can trim off the currency
var currencyPointer = tmpValue.search(/\d/);
var tmpCurrency = tmpValue.substring(0,currencyPointer).trim();
// get our project name
var projectName = $(this).parent().parent().find(".flag-body strong").text();
// get the original amount (without currency symbol)
var originalAmount = tmpValue.replace(/[^0-9\.]/g, '');
// ensure we have an exchange translation for our currency
if(!(tmpCurrency in exchangeArray)) {
// explain why we're skipping
console.log("- skipping '" + projectName + "' with currency of " + tmpCurrency);
// add to our data array with null converted amount
projectData.push({
project: projectName,
currency: tmpCurrency,
amount: originalAmount,
convertedUSD: null,
status: 'unknown currency'
});
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
} else {
// ensure we don't have a blank currency, this is
// a quirk from kickstarter with certain currencies like NOK
if(tmpCurrency !== "") {
// float that bad boy
var tmpTotal = parseFloat(originalAmount);
// convert using our exchange rate lookup
var convertedAmount = tmpTotal * exchangeArray[tmpCurrency];
// add to our data array
projectData.push({
project: projectName,
currency: tmpCurrency,
amount: originalAmount,
convertedUSD: convertedAmount.toFixed(2),
status: 'converted'
});
// cumulate our paid placeholder
paidTotal = paidTotal + convertedAmount;
// increment our index of paid projects
paidIndex++;
} else {
// add to our data array with skipped status
projectData.push({
project: projectName,
currency: 'blank',
amount: originalAmount,
convertedUSD: null,
status: 'skipped - blank currency'
});
// probably a wonky currency, so skip but increment so we can show that later
skippedIndex++;
}
}
// increment our total
totalIndex++;
});
// round for display purposes
var paidTotalFormatted = paidTotal.toLocaleString('en-US', {style: 'currency', currency: 'USD'});
// hit us with the damage captain
console.log("\n\n----------\nYou've paid " + paidTotalFormatted + " from " + totalIndex + " projects (" + skippedIndex + " skipped)");
// generate csv
function generateCSV(data) {
// csv header
var csv = 'Project,Currency,Amount,Converted USD,Status\n';
// add each row
data.forEach(function(row) {
// escape project names that might have commas
var projectName = '"' + row.project.replace(/"/g, '""') + '"';
var convertedUSD = row.convertedUSD !== null ? row.convertedUSD : '';
csv += projectName + ',' + row.currency + ',' + row.amount + ',' + convertedUSD + ',' + row.status + '\n';
});
return csv;
}
// create the csv content
var csvContent = generateCSV(projectData);
// create a blob and download link
var blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
var link = document.createElement('a');
var url = URL.createObjectURL(blob);
link.setAttribute('href', url);
link.setAttribute('download', 'kickstarter_backings.csv');
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
console.log("\n✓ CSV file downloaded!");
console.log("Total rows: " + projectData.length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment