1(function($) { 2 $(function() { 3 $('.designcal').each(function() { 4 let cal = $(this) 5 6 let positems = function() { 7 let w = cal.width() 8 let h = cal.data('ratio') * parseFloat(w) 9 cal.css({ 10 height: h + 'px', 11 fontSize: Math.round(10 + h / 100) + 'px' 12 }) 13 14 cal.find('.door').each(function() { 15 let door = $(this) 16 door.css({ 17 position: 'absolute', 18 width: (w * door.data('width')) / 100 + 'px', 19 height: (h * door.data('height')) / 100 + 'px', 20 left: (w * door.data('x')) / 100 + 'px', 21 top: (h * door.data('y')) / 100 + 'px' 22 }) 23 }) 24 } 25 positems() 26 27 $(window).on('resize', positems) 28 29 cal.find('.door').on('click', function() { 30 let di = $(this).data('index') 31 let id = cal.data('calid') 32 33 $.post( 34 WPURLS.siteurl.replace('http:', document.location.protocol).replace('https:', document.location.protocol)+'/wp-json/designcal/getdooraction', 35 { 36 doorindex: di, 37 calid: id 38 }, 39 function(result) { 40 if (result.url) { 41 if (result.newwin && (result.newwin == 1 || result.newwin == '1')) { 42 if (!result.url.startsWith('http')) { 43 result.url = 'http://'+result.url 44 } 45 window.open(result.url) 46 } else { 47 document.location.href = result.url 48 } 49 } 50 }, 51 'json' 52 ) 53 }) 54 }) 55 }) 56})(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.