1$(document).ready(function () { 2 var adultConfirmed = sessionStorage.getItem('gmadult'); 3 if (adultConfirmed != '1') { 4 if ($('.gm-popup-overlay').hasClass('must-show') || $('.product-container.adult').length > 0) { 5 $('.gm-popup-overlay').show(); 6 centerThePopup(); 7 } 8 } else { 9 $('.gm-popup-overlay').hide(); 10 } 11 $('.adult-enter').click(function (e) { 12 e.preventDefault(); 13 var confirmUrl = $(this).attr('href'); 14 $.get(confirmUrl).always(function () { 15 $('.gm-popup').animate({ 16 top: '-1000px' 17 }, 750, function () { 18 $('.gm-popup-overlay').fadeOut('slow'); 19 }); 20 sessionStorage.setItem('gmadult', '1'); 21 }); 22 }); 23}); 24 25$(window).resize(function () { 26 centerThePopup(); 27}); 28 29function centerThePopup() { 30 if ($('.gm-popup').length) { 31 var windowHeight = viewport().height; 32 var termsHeight = $('.popup-terms').outerHeight(); 33 if (termsHeight > windowHeight * 0.5) { 34 $('.popup-terms').css({ 35 maxHeight: windowHeight * 0.5 + 'px', 36 overflowY: 'scroll' 37 }); 38 } 39 var popupHeight = $('.gm-popup').outerHeight(); 40 popupTop = (windowHeight - popupHeight) / 2; 41 $('.gm-popup').css({ 42 top: popupTop + 'px' 43 }); 44 } 45} 46 47function viewport() { 48 var e = window, a = 'inner'; 49 if (!('innerWidth' in window)) { 50 a = 'client'; 51 e = document.documentElement || document.body; 52 } 53 return {width: e[ a + 'Width' ], height: e[ a + 'Height' ]}; 54}
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.