close unused tab after 30 minutes extension
hi i am working on Firefox extension and one of the feature is to close tabs automatically if a tab is inactive from last 30 minutes. i am not sure where to get started with this looking forward to get some suggestions.
- User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Hi sanam204, what is your definition of inactive?
Your extension can check when each tab was last accessed and confirm that it is not the active (focused) tab in the window. Those are properties of each tab and you can access them without any special permissions. See:
However, understanding what is happening with the content in the tab may require injecting scripts into tabs, which requires a lot of permissions. I wouldn't recommend that as your "version 0.1" approach unless it's critical.
The Add-ons team has a forum for extension developers over here:
Hi jscher2000 thanks for your reply, by inactive I mean any tab which I’m not currently using (for examples I have opened 6 tabs in the browser and 2 of them i haven’t clicked from last 30 minutes so I want those 2 to get automatically closed after 30 minutes)
These exemplary extensions should help you: