Sha256: 9c7879ddcd9013c3a7459b4941584133815f9f5d2f82105fd072874258966985
Contents?: true
Size: 473 Bytes
Versions: 31
Compression:
Stored size: 473 Bytes
Contents
/** * Scroll smoothly to the last message automatically when the page is fully loaded. * To apply this to a page, at least one element must have the class "scroll-to-last-message". * @returns {void} */ const scrollToLastMessage = function() { if ($(".scroll-to-last-message").length > 0) { window.scrollTo({ top: $(".conversation-chat:last-child").offset().top, behavior: "smooth" }); } } $(document).ready(() => { scrollToLastMessage(); });
Version data entries
31 entries across 31 versions & 1 rubygems