Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kulturpessimist/dbda6c50ea99455eaf4ea48fc75bfaa8 to your computer and use it in GitHub Desktop.
Save kulturpessimist/dbda6c50ea99455eaf4ea48fc75bfaa8 to your computer and use it in GitHub Desktop.
window._research = window._research || {};
window._research._fn = {
i18n: function () {
return function (o, render) {
o = o.split('}}')[0] + '.' + window._locale + '}}';
return render(o).trim();
}
},
fullDate: function () {
return function (i, render) {
var d = new Date(render(i).trim() * 1000);
return new Intl.DateTimeFormat(window._locale, {
year: 'numeric',
month: 'long',
day: '2-digit'
}).format(d);
}
},
toTonns: function () {
return function (i, render) {
var f;
var e = Number(render(i).trim()) / 1000;
if (e <= 10) {
f = new Intl.NumberFormat(window._locale, {
minimumFractionDigits: 3,
maximumFractionDigits: 3
});
} else {
f = new Intl.NumberFormat(window._locale, {
minimumFractionDigits: 0,
maximumFractionDigits: 0
});
}
return f.format(e);
}
},
std: function () {
return function (i, render) {
// sonderfall 131
var id = render("{{_id}}");
if (id == "cop_131-Jari-Amapa") {
return "VCS/ REDD+/ CCBS";
}
//
var resp = render(i).trim();
if (resp.toLowerCase().indexOf('gs') > -1) {
resp = "Gold Standard";
}
return resp;
}
},
copName: function () {
return function (i, render) {
var resp;
var cops = [{
"key": "cop_1-myclimate_internationales_portfolio",
"value": "myClimate international portfolio"
},
{
"key": "cop_10-wrme_aus_holzschnitzeln_in_melchnau",
"value": "Heat from Biomass in Melchnau"
},
{
"key": "cop_100-PROJECT-TOGO",
"value": "PROJECT TOGO"
},
{
"key": "cop_101-Alpen",
"value": "Deutschland plus Alpen"
},
{
"key": "cop_102-Schwarzwald",
"value": "Deutschland plus Schwarzwald"
},
{
"key": "cop_103-Rhoen",
"value": "Deutschland plus Rhön"
},
{
"key": "cop_104-Hunsrueck",
"value": "Deutschland plus Hunsrück"
},
{
"key": "cop_105-Werdohl",
"value": "Deutschland plus Werdohl"
},
{
"key": "cop_106-Montafon",
"value": "Österreich plus Montafon"
},
{
"key": "cop_107-Ecomapua",
"value": "Ecomapua REDD+"
},
{
"key": "cop_108-Bujagali",
"value": "Bujagali Hydropower"
},
{
"key": "cop_109-Sarbari",
"value": "Sarbari II Hydropower"
},
{
"key": "cop_11-kundenprojekt_intern_verrechnet",
"value": "Customer project (internally cleared)"
},
{
"key": "cop_110-Ghana",
"value": "Toyola Clean Cookstoves Ghana"
},
{
"key": "cop_111-Paradigm-Project",
"value": "Paradigm Cookstoves and Water Treatment"
},
{
"key": "cop_112-Infravest",
"value": "Infravest Changbing+Taichung Wind Power"
},
{
"key": "cop_113-aac",
"value": "Efficient AAC Blocks manufacturing"
},
{
"key": "cop_114-Wald-Mix",
"value": "Wald Mix"
},
{
"key": "cop_115-Technik-Mix",
"value": "Erneuerbare Energien Mix"
},
{
"key": "cop_116-Kibale-Project",
"value": "Kibale REDD+ Project"
},
{
"key": "cop_117-Brazil-Nut",
"value": "Brazil Nut Rainforest Community Project"
},
{
"key": "cop_118-Prony",
"value": "Prony Wind Power"
},
{
"key": "cop_119-Bac-Lieu",
"value": "Bac Lieu Wind Farm"
},
{
"key": "cop_120-Xenamnoy",
"value": "Xenamnoy Saysetha Small Hydropower Project"
},
{
"key": "cop_121-Anaerobic-digestion",
"value": "Anaerobic digestion and Heat Generation"
},
{
"key": "cop_122-Biloite",
"value": "BioLite Homestove Project"
},
{
"key": "cop_123-Hindustan-Spinners",
"value": "Wind Energy Project Hindustan Spinners"
},
{
"key": "cop_124-Aura-Solar",
"value": "Aura Solar I Solar Project"
},
{
"key": "cop_125-TSE",
"value": "TSE - Siam Solar Energy"
},
{
"key": "cop_126-Deutschland-portfolio",
"value": "Deutschland Plus Portfolio"
},
{
"key": "cop_127-Schwarzwald",
"value": "Deutschland plus Schwarzwald"
},
{
"key": "cop_128-la_buena_cocina",
"value": "La Buena Cocina"
},
{
"key": "cop_129-Nederland-plus",
"value": "Nederland Plus De Biesbosch"
},
{
"key": "cop_130-portfolio-brasilien-togo",
"value": "Waldschutz/ Aufforstung Brasilien/ Togo"
},
{
"key": "cop_131-Jari-Amapa",
"value": "Waldschutzprojekt Jari/Amapa"
},
{
"key": "cop_132-Jari-Amapa-plus",
"value": "Jari / Amapá plus"
},
{
"key": "cop_200-PROJECT-TOGO",
"value": "PROJECT TOGO"
},
{
"key": "cop_201-Alpen",
"value": "Deutschland plus Alpen"
},
{
"key": "cop_202-Schwarzwald",
"value": "Deutschland plus Schwarzwald"
},
{
"key": "cop_203-Rhoen",
"value": "Deutschland plus Rhön"
},
{
"key": "cop_204-Hunsrueck",
"value": "Deutschland plus Hunsrück"
},
{
"key": "cop_205-Werdohl",
"value": "Deutschland plus Werdohl"
},
{
"key": "cop_206-Montafon",
"value": "Österreich plus Montafon"
},
{
"key": "cop_226-Deutschland-portfolio",
"value": "Deutschland Plus Portfolio"
},
{
"key": "cop_227-Schwarzwald",
"value": "Deutschland plus Schwarzwald"
},
{
"key": "cop_229-Nederland-plus",
"value": "Nederland Plus De Biesbosch"
},
{
"key": "cop_299-Deutschland-plus-arche",
"value": "Deutschland plus Arche Wader"
},
{
"key": "cop_13-projekt_fr_haushalts-biogaskraftwerke_indien",
"value": "Project for household biogas plants India"
},
{
"key": "cop_14-effiziente_kocher_in_peru",
"value": "Efficient cookers in Peru"
},
{
"key": "cop_16-gutschrift_zur_verrechnung_",
"value": ""
},
{
"key": "cop_17-wasserkraftwerk_am_buritis",
"value": "Hydroelectric power plant on Buritis"
},
{
"key": "cop_18-natureoffice_gold_standard_portfolio",
"value": "Portfolio (en)"
},
{
"key": "cop_19-biodiversitts-wiederaufforstungs_in_vietnam",
"value": "Biodiversity Reforestation in Vietnam"
},
{
"key": "cop_2-tropical_mix_aufforstungsprojekt_panama",
"value": "Tropical Mix Reforestation, Panama"
},
{
"key": "cop_20-native_forest_koa_reforestation_carbon_sequestration_project",
"value": "HMI Native Forest Carbon Sequestration"
},
{
"key": "cop_21-abwasseraufbereitung_und_biogasnutzung_thailand",
"value": "Wastewater Treatment with Biogas Production, Thailand"
},
{
"key": "cop_23-biomass_fuel_switching_project",
"value": "Biomass Fuel Switching Project"
},
{
"key": "cop_24-project-togo",
"value": "PROJECT TOGO"
},
{
"key": "cop_25-water-purification-kenya",
"value": "Water purification filters, Kenya"
},
{
"key": "cop_26-scolel-te-mexico",
"value": "Scolel ´Te, México Plan Vivo"
},
{
"key": "cop_27-natureoffice_gold_standard_portfolio",
"value": "natureOffice Klimaschutz Portfolio"
},
{
"key": "cop_28-project-togo",
"value": "PROJECT TOGO"
},
{
"key": "cop_29-la_buena_cocina",
"value": "La Buena Cocina"
},
{
"key": "cop_3-biogas_projekt_in_malavalli",
"value": "Bio gas project in Malavalli"
},
{
"key": "cop_30-alpen_plus",
"value": "Alpen"
},
{
"key": "cop_31-rhoen_plus",
"value": "Rhön"
},
{
"key": "cop_32-werdohl_plus",
"value": "Werdohl"
},
{
"key": "cop_33-zechlinerhuette_plus",
"value": "Zechlin"
},
{
"key": "cop_34-hunsrueck_plus",
"value": "Hunsrück"
},
{
"key": "cop_35-triberg_plus",
"value": "Schwarz Wald"
},
{
"key": "cop_36-deutschland_plus_portfolio",
"value": "Deutschland Portfolio"
},
{
"key": "cop_37-oesterreich_plus_portfolio",
"value": "Österreich plus Montafon"
},
{
"key": "cop_38-project-togo",
"value": "PROJECT TOGO"
},
{
"key": "cop_39-schweiz_plus_portfolio",
"value": "Schweiz Plus"
},
{
"key": "cop_4-biogasanlage_sandbeiendorf_",
"value": "Biogas Sandbeiendorf"
},
{
"key": "cop_40-patagonia-sur",
"value": "Patagonia Sur"
},
{
"key": "cop_40-wind_power_china",
"value": "Wind power, China"
},
{
"key": "cop_41-alpen_plus",
"value": "Alpen+"
},
{
"key": "cop_42-project-togo",
"value": "PROJECT TOGO"
},
{
"key": "cop_43-alpen_plus",
"value": "Werdohl"
},
{
"key": "cop_43-delta_reforestation",
"value": "Delta Reforestation"
},
{
"key": "cop_44-truck_stop",
"value": "Truck Stop"
},
{
"key": "cop_45-wind-schweiz",
"value": "Wind"
},
{
"key": "cop_46-wasser-schweiz",
"value": "Wasser"
},
{
"key": "cop_47-biomasse-schweiz",
"value": "Biomasse"
},
{
"key": "cop_48-windkraftwerk-susurluk",
"value": "Windkraftwerk Susurluk Rüzgar Santrali"
},
{
"key": "cop_49-eigene-flaeche",
"value": "Eigene Flächen"
},
{
"key": "cop_5-biomasse_projekt_in_uttarakhand_indien",
"value": "Efficient Biomass Stove and Briquetting Project in Uttarakhand, India"
},
{
"key": "cop_50-project-togo",
"value": "PROJECT TOGO"
},
{
"key": "cop_51-alpen_plus",
"value": "Alpen"
},
{
"key": "cop_52-rhoen_plus",
"value": "Rhön"
},
{
"key": "cop_53-werdohl_plus",
"value": "Werdohl"
},
{
"key": "cop_54-zechlinerhuette_plus",
"value": "Zechlin"
},
{
"key": "cop_55-hunsrueck_plus",
"value": "Hunsrück"
},
{
"key": "cop_56-triberg_plus",
"value": "Schwarz Wald"
},
{
"key": "cop_57-deutschland_plus_portfolio",
"value": "Deutschland Portfolio"
},
{
"key": "cop_58-natureoffice_gold_standard_portfolio",
"value": "Portfolio\n"
},
{
"key": "cop_6-windenergie_neuseeland",
"value": "Wind Energy, New Zealand"
},
{
"key": "cop_60-alpen_plus",
"value": "Alpen"
},
{
"key": "cop_61-rhoen_plus",
"value": "Rhön"
},
{
"key": "cop_7-windenergie_in_izmir_trkei",
"value": "Yuntdag 42.5 MW Wind Power Project, Turkey"
},
{
"key": "cop_70-deutschland-plus-portfolio",
"value": "Deutschland Portfolio"
},
{
"key": "cop_70-Guangdong_Chaonan_Shalong_Wind_Power_Project",
"value": "Guangdong Wind Project"
},
{
"key": "cop_71-deutschland-plus-portfolio",
"value": "Deutschland Portfolio"
},
{
"key": "cop_8-wasserkraft_in_hunan_china",
"value": "Xing Long, LongHe and DiYao Hydro Power Projects"
},
{
"key": "cop_9-solarkocher_in_ningxia_hui_china",
"value": "Solar Cooker Project in Rural China"
}
];
var key = render(i).trim();
var cop;
for (var c in cops) {
cop = cops[c];
if (key == cop.key) {
resp = cop.value;
}
}
return resp;
}
},
socialName: function () {
return function (i, render) {
var resp;
var socials = {
"ecocent": "ECO Cent e.V.",
"caritas": "Caritasverband e.V.",
"peta": "PETA Deutschland e.V.",
"sos": "SOS-Kinderdorf e.V.",
"miserior": "Bischöfliches Hilfswerk MISEREOR e.V.",
"horizont": "HORIZONT e.V.",
"nestwaerme": "nestwärme e.V. Deutschland",
"clown": "Die Clown Doktoren e.V.",
"donbosco": "Don Bosco Jugendwerk Bamberg",
"bildungscent": "BildungsCent e.V.",
"oxfam": "Oxfam Deutschland e.V.",
"bergwald": "Bergwaldprojekt e.V.",
"banditen": "Charity Banditen",
"werr": "ANTONIA-WERR-ZENTRUM"
};
var key = render(i).trim().toLowerCase();
resp = socials[key] || "";
return resp;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment