From 65019042f967881f42609fc9bb05daa71996d7b2 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Aug 2023 14:40:48 -0700 Subject: [PATCH] Delete unused Pledgie files This was back when we used a third-party campaign tool! Haven't run this code in ages! --- app/assets/javascripts/pledgie.js | 39 ------------------------------- config/initializers/pledgie.rb | 2 -- 2 files changed, 41 deletions(-) delete mode 100644 app/assets/javascripts/pledgie.js delete mode 100644 config/initializers/pledgie.rb diff --git a/app/assets/javascripts/pledgie.js b/app/assets/javascripts/pledgie.js deleted file mode 100644 index d469ada6..00000000 --- a/app/assets/javascripts/pledgie.js +++ /dev/null @@ -1,39 +0,0 @@ -(function () { - var PLEDGIE_CAMPAIGN_ID = $('meta[name=pledgie-campaign-id]').attr('content'); - - var pledgieURL = 'http://pledgie.com/campaigns/' + PLEDGIE_CAMPAIGN_ID + '.json?callback=?'; - $.getJSON(pledgieURL, function (data) { - var campaign = data.campaign; - - // Write the donors list if we need to - var donorsEl = $('#campaign-donors'); - if(donorsEl.length) { - var donorsList = donorsEl.children('ol'); - var pledges = campaign.pledges; - - var pledge, pledgeEl; - for(var i in pledges) { - pledge = pledges[i]; - pledgeEl = $('
  • '); - $('', {text: pledge.display_name}).appendTo(pledgeEl); - $('', {text: pledge.date}).appendTo(pledgeEl); - pledgeEl.appendTo(donorsList); - } - - if(pledges.length > 0) { - donorsEl.addClass('has-donors'); - } - } - - // Set campaign progress data - $('span.campaign-raised').text(campaign.amount_raised); - $('span.campaign-goal').text(campaign.goal); - - var campaign_percent = campaign.amount_raised / campaign.goal * 100; - if(campaign_percent > 100) campaign_percent = 100; - $('div.campaign-progress').css('width', campaign_percent + '%'); - - $(document.body).addClass('campaign-loaded'); - }); -})(); - diff --git a/config/initializers/pledgie.rb b/config/initializers/pledgie.rb deleted file mode 100644 index 7c16a653..00000000 --- a/config/initializers/pledgie.rb +++ /dev/null @@ -1,2 +0,0 @@ -PLEDGIE_CAMPAIGN_ID = 15581 -