HindsightTwentyTwenty / frontend

The Official Front End of Hindsite Inc.
0 stars 1 forks source link

Add OnQuit/OnWindowClose Listener #259

Closed zatannenbaum closed 7 years ago

zatannenbaum commented 7 years ago

Not sure how exactly to do this, but right now if you quit chrome it doesn't make a closetab call and so any tabs that are open are still open when you reopen chrome

trk17 commented 7 years ago

Poked around and came across this: https://developer.chrome.com/extensions/declare_permissions#bg

Seems like the issue stems from the background.js stopping immediately once chrome is quit. If we can keep it going long enough to recognize tabs closing to send the http posts it might work.

I'll check this out tomorrow and try to find a solution.

zatannenbaum commented 7 years ago

@trk17 sounds good. This might help too: http://stackoverflow.com/questions/3390470/event-onbrowserclose-for-google-chrome-extension