co2offset
Version:
Greenhouse Gas Accounting - ISO14064
1 lines • 556 B
JavaScript
$(document).ready((function(){$("#hdrInfo").hide(),$(".hdrinfo").hide(),$("#publicURL").val(location.href),$("#saveCopy").submit((function(t){$("#btnSubmit").attr("disabled","disabled");var e=location.search.substring(1);let a=JSON.parse('{"'+decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');a.title=$("#addTitle").val(),a.qty=$("#addQty").val(),$.post("https://api.corrently.io/v2.0/co2/upsertEvent",a,(function(t){$("#btnSubmit").removeAttr("disabled"),$("#addTitle").val(""),$("#addQty").val(0)})),t.preventDefault()}))}));