1; (function ($) { 2 'use strict' 3 4 $(window).on('load', function () { 5 stm_scroll_user_sidebar() 6 stm_private_user_height() 7 }) 8 9 $(window).on('scroll', function () { 10 stm_scroll_user_sidebar() 11 }) 12 13 $(window).on('resize', function () { 14 stm_private_user_height() 15 }) 16 17 function stm_scroll_user_sidebar() { 18 if ($(window).width() > 820) { 19 var $stm_window = $(window) 20 var $stm_sidebar = $('.stm-sticky-user-sidebar .stm-user-private-sidebar') 21 var $stm_sidebar_holder = $('.stm-sticky-user-sidebar') 22 23 if ( 24 $stm_sidebar.outerHeight() < $stm_window.outerHeight() && 25 $stm_sidebar.length 26 ) { 27 var currentScrollPos = $(window).scrollTop() 28 var sidebarPos = $stm_sidebar_holder.offset().top 29 30 if (currentScrollPos > sidebarPos) { 31 $stm_sidebar.addClass('side-fixed') 32 } else { 33 $stm_sidebar.removeClass('side-fixed') 34 } 35 } 36 } 37 } 38 39 function stm_private_user_height() { 40 var windowH = $(window).outerHeight() 41 var topBarH = $('#top-bar').outerHeight() || 0 42 var headerH = $('#header').outerHeight() || 0 43 var minH = windowH - (topBarH + headerH) 44 45 $('.stm-user-private-sidebar').css({ 46 'min-height': minH + 'px', 47 }) 48 } 49})(jQuery)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.