Override webflow.js

Hello guys.

I would like to know if it is possible to override functions and other stuff in webflow.js.
I only have access to that script when I export my website code, but I want to host my site in Webflow, not to export it.

What can I do?

Thanks in advance! :slight_smile:

EDIT:
Webflow.js states:

Inline scripts may access the api using an async handler:

  • var Webflow = Webflow || ;
  • Webflow.push(readyFunction);

Could that be a solution?

2 Likes

Like what? You can as long as you know what you are doing, as any error could possible cause the entire site to malfunction (including interactions).

The full code snippet should be

<script>
var Webflow = Webflow || [];
Webflow.push(function() {
  // Your code here...
});
</script>

and should be placed in the footer code before closing body tag.

Hey @samliew!

Like strings (which are in English, and I wish to translate them to Portuguese); allowing background scrolling when using a lightbox (which is currently set as noscroll);

These are just examples. I do believe there are many other simple things I could change to tweak my website, I mean, a more custom experience. :slight_smile:

Great, let us know when you have a specific problem. There are a lot of workarounds in the forum, and you just have to search for them.

1 Like