carbonalyser / Carbonalyser

The add-on "Carbonalyser" allows to visualize the electricity consumption and greenhouse gases (GHG) emissions that your Internet browsing leads to.
https://theshiftproject.org/en/carbonalyser-browser-extension/
MIT License
148 stars 37 forks source link

Ignore cache requests & no track incognito host #15

Closed Jolg42 closed 3 months ago

Jolg42 commented 5 years ago

Fixes #12 as requests fromCache: true are noew ignored.

Replace host name by Incognito if the request was made in Incognito mode.

Voilà 😄

supertanuki commented 5 years ago

Hi @Jolg42 and thanks for this contribution. I will test it as soon as possible.

ImaCrea commented 4 years ago

This is in deed very important in order to have meaningful results. Thanks @Jolg42 I can't wait to see the difference. Meanwhile, however it's great work @supertanuki I believe it should be mentioned somewhere that these data are not be taken "as is" for the moment.

pveber commented 4 years ago

Is there any problem holding the PR back? It should make quite a difference on the estimated footprint.

supertanuki commented 4 years ago

We will take a look on this PR. There is a conflict to revolve due to the chrome support code modification

cguignol commented 4 years ago

Hi @Jolg42 , I've made at the end of 2019 several modifications about chrome extension support.

I watched your code, and he's a bit far from the current code from master branch. I think you should get the more recent from the branch and redo your modifications... so I'm here to help you 👍

I made several modifications from your work this afternoon, and it seems that I succeeded not only to merge your code, but also I made test alignement to maintain a acceptable test coverage.

Can you contact me directly to see how I can properly give you my code for a merge? I'm a bit rusted with Gitlab 👴

Jolg42 commented 4 years ago

Hi @cguignol 😄

I guess you can commit it directly and close this PR. That would be easier.

I'm curious to see the change, please send a link here if you can 😉

cguignol commented 4 years ago

Hi @cguignol 😄

I guess you can commit it directly and close this PR. That would be easier.

I'm curious to see the change, please send a link here if you can 😉

I had to remove several "const" statements because it prevents the code to be tested (function call and mock problems). If you find a solution, be pleased to make the modifications.

I'll make the commit soon ;)

rakoo commented 4 years ago

Is there something preventing this one to be merged ? I'm also maintaining my own version locally to have more accurate results, I'd like to see it upstream so everyone can benefit from it