Automatically group tabs in side-menu or pop-over when they don't fit

Different screen sizes will be able to fit a different number of tabs next to each other. I was wondering if anybody was able to group the tabs that won’t fit into some sort of ‘More’ tab that produces a side-menu on the right or a pop-over listing all the tabs that don’t fit.

I tried to draw what I mean:

Is this possible?