YouTube Demo at https://youtu.be/Pz57eqdwTwE
- Download the code files: "detectWPZ-vanilla.js" "detectWPZ-tabs.js" "webPart_webSiteAssets_detectWPZ.html"
- Upload the code files to your site's Site Assets library
- Go to the page where you want to convert web parts to tabs, then switch to Edit Page mode
- Add a content editor web part (CEWP) to the desired web parts zone or wiki layout zone
- Link the CEWP to the "webPart_webSiteAssets_detectWPZ.html" file, set its Chrome Type to None, and position it below all other web parts in the zone
- Click OK to save your changes to the CEWP
- Stop editing the page to see the results