Custom JS helper


#1

Maybe a weird question but is there a way to overwrite/customize the default js() helper?
Without messing with the core obviously.

There’s two things I’d love to add to it but I’m not sure what’s the best way to do it.


#2

No need to overwrite it, you can just create your own helper function.


#3

Can I just grab the current implementation and register my own js() function?
Now that I think about it I could simply try do it and see what happens :sweat_smile:


#4

Yes, exactly, just use another name for your function. For another option have a look at one of the buster plugins: https://github.com/HashandSalt/autobuster


#5

I was actually looking into this right now which seems exactly what I’m looking for.


#6

Yes, that’s the same the plugin does.


#7

Extending the core component worked like a charm :ok_hand: