1window.addEvent('load', function() { 2 if(document.id('gkExtraMenu')) { 3 // fix for the iOS devices 4 document.getElements('#gkExtraMenu ul li span').each(function(el) { 5 el.setProperty('onmouseover', ''); 6 }); 7 8 document.getElements('#gkExtraMenu ul li a').each(function(el) { 9 el.setProperty('onmouseover', ''); 10 11 if(el.getParent().hasClass('haschild') && document.getElement('body').getProperty('data-tablet') != null) { 12 el.addEvent('click', function(e) { 13 if(el.retrieve("dblclick", 0) === 0) { 14 e.stop(); 15 el.store("dblclick", new Date().getTime()); 16 } else { 17 var now = new Date().getTime(); 18 if(now - el.retrieve("dblclick", 0) < 500) { 19 window.location = el.getProperty('href'); 20 } else { 21 e.stop(); 22 el.store("dblclick", new Date().getTime()); 23 } 24 } 25 }); 26 } 27 }); 28 29 var base = document.id('gkExtraMenu'); 30 31 if($GKMenu && ($GKMenu.height || $GKMenu.width)) { 32 base.getElements('li.haschild').each(function(el){ 33 if(el.getElement('.childcontent')) { 34 var content = el.getElement('.childcontent'); 35 var prevh = content.getSize().y; 36 var prevw = content.getSize().x; 37 38 var fxStart = { 'height' : $GKMenu.height ? 0 : prevh, 'width' : $GKMenu.width ? 0 : prevw, 'opacity' : 0 }; 39 var fxEnd = { 'height' : prevh, 'width' : prevw, 'opacity' : 1 }; 40 41 var fx = new Fx.Morph(content, { 42 duration: $GKMenu.duration, 43 link: 'cancel', 44 onComplete: function() { 45 if(content.getSize().y == 0){ 46 content.setStyle('overflow', 'hidden'); 47 } else if(content.getSize().y - prevh < 30 && content.getSize().y - prevh >= 0) { 48 content.setStyle('overflow', 'visible'); 49 } 50 } 51 }); 52 53 fx.set(fxStart); 54 content.setStyles({'left' : 'auto', 'overflow' : 'hidden' }); 55 56 el.addEvents({ 57 'mouseenter': function(){ 58 var content = el.getElement('.childcontent'); 59 60 if(content.getProperty('data-base-margin') != null) { 61 content.setStyle('margin-left', content.getProperty('data-base-margin') + "px"); 62 } 63 64 var pos = content.getCoordinates(); 65 var winWidth = window.getCoordinates().width; 66 var winScroll = window.getScroll().x; 67 68 if(pos.left + prevw > (winWidth + winScroll)) { 69 var diff = (winWidth + winScroll) - (pos.left + prevw) - 5; 70 var base = content.getStyle('margin-left').toInt(); 71 var margin = base + diff; 72 73 if(base > 0) { 74 margin = -prevw + 10; 75 } 76 content.setStyle('margin-left', margin + "px"); 77 78 if(content.getProperty('data-base-margin') == null) { 79 content.setProperty('data-base-margin', base); 80 } 81 } 82 83 fx.start(fxEnd); 84 }, 85 86 'mouseleave': function(){ 87 content.setStyle('overflow', 'hidden'); 88 fx.start(fxStart); 89 } 90 }); 91 } 92 }); 93 } 94 } 95});
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.