Skip to content

Build your personal knowledge base with Trilium Notes

client/settings/disable motion: turn off jQuery animations if motion is disabled

Adorian Dorand1538508e8a3
diff --git a/apps/server/src/assets/views/desktop.ejs b/apps/server/src/assets/views/desktop.ejs
index 6327a63b3e..1158612beb 100644
--- a/apps/server/src/assets/views/desktop.ejs
+++ b/apps/server/src/assets/views/desktop.ejs
@@ -56,5 +56,12 @@
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
<script src="<%= appPath %>/desktop.js" crossorigin type="module"></script>
+<script>
+ // Turn off jQuery animations if motion is disabled
+ addEventListener("DOMContentLoaded", () => {
+ jQuery.fx.off = <%= motionEnabled !== true %>;
+ });
+</script>
+
</body>
</html>