Skip to content

Commit 20e4853

Browse files
Add rebuilt script
1 parent c263eb7 commit 20e4853

File tree

1 file changed

+1
-5
lines changed
  • src/Umbraco.Community.Sustainability/wwwroot/App_Plugins/Umbraco.Community.Sustainability

1 file changed

+1
-5
lines changed

src/Umbraco.Community.Sustainability/wwwroot/App_Plugins/Umbraco.Community.Sustainability/resource-checker.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { co2, hosting } from 'https://cdn.skypack.dev/@tgwf/co2@0.15';
22

3-
async function reportEmissions() {
3+
export async function reportEmissions() {
44
console.log("reportEmissions called");
55

66
await scrollPage();
@@ -35,8 +35,6 @@ async function getEmissionsData() {
3535
const co2Emission = new co2({ model: "swd" });
3636
const emissions = co2Emission.perVisitTrace(bytesSent, hostCheck);
3737

38-
debugger;
39-
4038
return {
4139
pageWeight: bytesSent,
4240
carbonRating: calculateGrade(emissions.co2),
@@ -64,5 +62,3 @@ function calculateGrade(score) {
6462
if (score < 0.846) return 'E';
6563
return 'F';
6664
}
67-
68-
await reportEmissions();

0 commit comments

Comments
 (0)