Count closed tabs?

I’d like to develop a ‘Count Closed Tabs’ addin/plugin for Firefox.

The idea is that I’d like to gamify the process of cleaning up after my online excursions. The metric of number of closed tabs seems like a reasonable proxy for how well I did for the day.

Would this be technically feasible? Where should I start? I have never developed a plugin before.
thank you so much!

There is a tabClose event, so what you want should be easy. As always, the work is likely to be in presenting the information and tweaking the addon behaviour (eg. resetting counts).

1 Like

Thank you so much Lithopsian. It looks like from [1] that I can use pure JS for this plugin, since the tabs api [2] is a top-level api, right? Later on, I am not sure if the new Chrome-like way [3] will deprecate the JS code? Or will JS still be supported?
Anne

1.[]Main page has debugging , etiequette, performance etc info on how to do a plugin ; ; ; X.Add-ons - Mozilla | MDN ;; https://developer.mozilla.org/en-US/Add-ons

2.[]JavaScript Examples and details about specifially the tab api ; ; This is in the top-level api, so XUL is not required. ; ; X.tabs - Mozilla | MDN ;; https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs

3.[] NEW way ; ; ;similar? notify-link-clicks ; it has an injected code into all pages, and the background-script.js that listens to all the pages ; ; X.Example WebExtensions - Mozilla | MDN ;; https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples