no-transition icon indicating copy to clipboard operation
no-transition copied to clipboard

Disable jQuery animations

Open ghost opened this issue 8 years ago • 7 comments

Animations can be disabled by setting jQuery.fx.off to true

https://api.jquery.com/jquery.fx.off/

ghost avatar Jul 08 '17 10:07 ghost

Ohhh that's interesting. I will do some test ASAP. Thanks for the tip.

Of course, if you want to do a pull requests, you are welcome.

gagarine avatar Jul 08 '17 14:07 gagarine

Ok I did a test with https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/executeScript but this run in some kind of isolated context.

So I think the way to go is to insert a script element in the page, execute it, then remove the element.

gagarine avatar Jul 08 '17 19:07 gagarine

Curious also about http://getbootstrap.com/javascript/#transitions $.support.transition = false

Bootstrap use jQuery, but perhaps they also have their own transitions that would be nice to disable at the JS level.

gagarine avatar Jul 11 '17 22:07 gagarine

but this run in some kind of isolated context.

window.wrappedJSObject.jQuery.fx.off = true;

see: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Content_scripts#Accessing_page_script_objects_from_content_scripts Note that using wrappedJSObject will probably flag your extension for admin review. And also only works in Firefox(-based) browsers.

NiklasGollenstede avatar Jul 15 '17 19:07 NiklasGollenstede

@gagarine, have you abandoned us?

sergeevabc avatar Dec 18 '19 15:12 sergeevabc

Yes sadly yes. I'm not using the plugin myself anymore as 1) web devs to got tired of this gimmick 2) Firefox handle animation a lot better in term of CPU usage.

I may return to it when I got some free time. I will accept pull requests.

gagarine avatar Dec 20 '19 14:12 gagarine

I still use it to disable things like the scrolling backgrounds at https://www.humblebundle.com/ and I wish I had time to write a PR to make it toggle things per-page because it causes "freeze up the entire tab"-level fatal breakages in situations like attempting to scroll down to the bottom in a GitHub Gist code editor widget.

ssokolow avatar Dec 20 '19 14:12 ssokolow