I am writing an extension that will override some jquery animations on a website we use often that’s UI is poor to none.
They have this animation of slideUp and slideDown that take like 6 seconds to do that I’m trying to override. I either want to test to see if an element is being hidden/hidden constantly while on the website (and if it’s hiding/hidden – show it) or just override the slide animations.
Is there a way to constantly test an object’s visibility? or is there a way to just turn of “slide” animations throughout the page without overriding their entire function (it has Ajax callbacks and items like that)?
You can change animation speed globally using
jQuery.fx.intervalproperty or turn all animations off usingjQuery.fx.off.As chrome extension content scripts are sandboxed and cannot access parent page’s variables, you would need to inject the
<script>tag to the page with your code:content_script.js:
inject.js: