Keyword

How to unset "k2.js"

More
7 years 10 months ago - 7 years 10 months ago #158963 by Joe Campbell
Replied by Joe Campbell on topic How to unset "k2.js"
You can use Regular Labs ReReplacer along with Regex to remove the K2.js file for any version of K2.



Below is the code to use in the search field (leave replace field empty)

Remove K2 JS (Only):
<script src="/media/k2/assets/js/k2.frontend.js(.*?)><\/script>

Remove K2 CSS & JS:
<script src="/media/k2/assets/(.*?)><\/script>

You MUST enable to Regular Expressions parameter for it to work:

Last edit: 7 years 10 months ago by Joe Campbell.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #158968 by Kelsey Brookes
Replied by Kelsey Brookes on topic How to unset "k2.js"
Thanks Joe, that's really great.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #158977 by Joe Campbell
Replied by Joe Campbell on topic How to unset "k2.js"
I figured it out guys.

Special thanks to @sanderpotjer from Perfect Web Team (I used his Joomla! template code as a reference):
gist.github.com/heyjoecampbell/ecd68c7447fa8c55a82ac8bfc83cdb93

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum