co2offset.io
Version:
Greenhouse Gas Accounting - ISO14064
1 lines • 683 B
JavaScript
void 0===window.app&&(window.app={});const app=async function(){$("#searchFrm").submit((function(e){window.app.renderSearchResults(),e.preventDefault()})),$("#hdrInfo").hide(),$(".hdrinfo").hide();let e=await window.co2accounting.keyValue();for(const[a,n]of Object.entries(e))$("#"+a).val(n);$(".metaInfo").change((async function(a){$("#saveBadge").show();let n={};n[$(this).attr("name")]=$(this).val(),e=await window.co2accounting.keyValue(n),$("#saveBadge").hide(),detailEntry(e)})),void 0!==e.nature&&$("input[name=nature][value="+e.nature+"]").attr("checked","checked"),$("#btnRefreshCache").click((async function(){await window.app.clearCache(),location.href="./index.html"}))};