Browser extension timeout in sync with app

This might be technically impossible, but maybe not: The desktop app timout “on system idle” is very handy, however, there’s no similar setting e.g. for the Firefox extension. Would it be possible to add a “on desktop app lock” timeout to the browser extension?