1// Android/WinPhone fix - forcing resize event on orientationchange (sometimes it doesn't trigger, and in the way we can force it) 2var mql = window.matchMedia('(orientation: portrait)'); 3 4if (mql) { 5 mql.addListener(function(m) { 6 $(window).trigger('resize'); 7 }); 8} 9 10 11 12// init moreNav helper - re-initiate content wrapper for more nav content 13function moreNav() { 14 var menu = $('.navigation'), 15 menuList = menu.find('ul'), 16 subnavClass = 'sublevel-'; 17 18 // check if menuList exists and if its parent is div 19 if (menuList.length && menuList.children('.more').find('ul').parent().is('div')) { 20 var moreNavList = menuList.children('.more').find('ul'), 21 moreNavListChildren = moreNavList.parent('div').children(); 22 23 // remove parent from moreNavLists 24 moreNavListChildren.unwrap(); 25 26 // reinit correct wrapping for more nav content 27 moreNavList.each(function() { 28 var moreNavList = $(this), 29 depth = moreNavList.parents('ul').length; 30 31 if (depth > 0) { 32 moreNavList.wrap(function() { 33 return '<div class="' + subnavClass + depth + '"></div>'; 34 }); 35 } 36 }); 37 } else if (menuList.length && !menuList.children('.more').find('ul').parent().is('div')) { 38 var moreNavChildren = menuList.children('.more').find('ul'); 39 40 // reinit correct wrapping for more nav content 41 moreNavChildren.each(function() { 42 var moreNavChildren = $(this), 43 depth = moreNavChildren.parents('ul').length; 44 45 if (depth > 0) { 46 moreNavChildren.wrap(function() { 47 return '<div class="' + subnavClass + depth + '"></div>'; 48 }); 49 } 50 }); 51 } 52 53 // remove default behavior from More link 54 menuList.children('.more').on('click', '> a', function(e) { 55 e.preventDefault(); 56 }); 57}
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.