Skip to content

Instantly share code, notes, and snippets.

View suhodolskiy's full-sized avatar
🇺🇦

Ilya Suhodolskiy suhodolskiy

🇺🇦
View GitHub Profile
<!-- Auto Rotate Webflow Tabs (Shared by @irishbuckley flowbase.co -->
<script>
var Webflow = Webflow || [];
Webflow.push(function () {
// Fix for Safari
if (navigator.userAgent.includes("Safari")) {
document.querySelectorAll(".tab-button").forEach((t)=>(t.focus=function(){const x=window.scrollX,y=window.scrollY;const f=()=>{setTimeout(()=>window.scrollTo(x,y),1);t.removeEventListener("focus",f)};t.addEventListener("focus",f);HTMLElement.prototype.focus.apply(this,arguments)}));
}