Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

close unused tab after 30 minutes extension

  • 3 uphendule
  • 1 inale nkinga
  • 8 views
  • Igcine ukuphendulwa ngu TyDraniu

more options

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.

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.

All Replies (3)

more options

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:

https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab

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:

https://discourse.mozilla.org/c/add-ons/development

more options

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)

more options