1// (function($, root, undefined) { 2// jQuery(function() { 3 // ============================================================================= 4 // THROTTLE 5 // ============================================================================= 6 7 function throttle(callback, delay) { 8 var last; 9 var timer; 10 return function() { 11 var context = this; 12 var now = +new Date(); 13 var args = arguments; 14 if (last && now < last + delay) { 15 clearTimeout(timer); 16 timer = setTimeout(function() { 17 last = now; 18 callback.apply(context, args); 19 }, delay); 20 } else { 21 last = now; 22 callback.apply(context, args); 23 } 24 }; 25 } 26 27 // ============================================================================= 28 // RESPONSIVE HELPER 29 // ============================================================================= 30 31 // function responsive_helper() { 32 // 33 // jQuery('body').append('<div id="responsive_helper" style="background-color:black;position:fixed;width:auto;height:auto;color:white;text-align:center;font-family:courier;line-height:30px;bottom:0;right:0;padding:0 10px;display:none;z-index:99999"><span class="size"></span><span class="floor" style="display:block"></span></div>'); 34 // jQuery(window).on('load resize', function(e) { 35 // 36 // jQuery("#responsive_helper .size").text(jQuery(window).outerWidth() + ' x ' + jQuery(window).outerHeight()); 37 // var width = jQuery(window).outerWidth(); 38 // if (width > 1280) { 39 // jQuery('#responsive_helper').css('background-color', 'lightgrey'); 40 // jQuery('#responsive_helper .floor').text('1280+'); 41 // } else if (width <= 1280 && width > 1140) { 42 // jQuery('#responsive_helper').css('background-color', 'firebrick'); 43 // jQuery('#responsive_helper .floor').text('1280 < 1140'); 44 // } else if (width <= 1140 && width > 1024) { 45 // jQuery('#responsive_helper').css('background-color', 'yellowgreen'); 46 // jQuery('#responsive_helper .floor').text('1140 < 1024'); 47 // } else if (width <= 1024 && width > 900) { 48 // jQuery('#responsive_helper').css('background-color', 'steelblue'); 49 // jQuery('#responsive_helper .floor').text('1024 < 900'); 50 // } else if (width <= 900 && width > 768) { 51 // jQuery('#responsive_helper').css('background-color', 'deeppink'); 52 // jQuery('#responsive_helper .floor').text('900 < 768'); 53 // } else if (width <= 768 && width > 700) { 54 // jQuery('#responsive_helper').css('background-color', 'goldenrod'); 55 // jQuery('#responsive_helper .floor').text('768 < 700'); 56 // } else if (width <= 700 && width > 600) { 57 // jQuery('#responsive_helper').css('background-color', 'blue'); 58 // jQuery('#responsive_helper .floor').text('700 < 480'); 59 // } else if (width <= 600 && width > 480) { 60 // jQuery('#responsive_helper').css('background-color', 'crimson'); 61 // jQuery('#responsive_helper .floor').text('600 < 480'); 62 // } else if (width <= 480 && width > 400) { 63 // jQuery('#responsive_helper').css('background-color', 'pink'); 64 // jQuery('#responsive_helper .floor').text('480 < 400'); 65 // } else if (width <= 400 && width > 320) { 66 // jQuery('#responsive_helper').css('background-color', 'purple'); 67 // jQuery('#responsive_helper .floor').text('400 < 320'); 68 // } else if (width < 320) { 69 // jQuery('#responsive_helper').css('background-color', 'yellow'); 70 // jQuery('#responsive_helper .floor').text('320 -'); 71 // } 72 // }); 73 // 74 // jQuery("#responsive_helper").slideToggle(); 75 // /*jQuery(window).on('keydown', function(e) { 76 // if (e.ctrlKey && e.keyCode === 38) { 77 // jQuery("#responsive_helper").slideToggle(); 78 // } 79 // });*/ 80 // 81 // } 82 // responsive_helper(); 83 84 // ===================================================================== 85 // GET INLINE SVG FROM IMG 86 // ===================================================================== 87 jQuery('img.svg').each(function() { 88 var $img = jQuery(this); 89 var imgID = $img.attr('id'); 90 var imgClass = $img.attr('class'); 91 var imgURL = $img.attr('src'); 92 93 jQuery.get(imgURL, function(data) { 94 // Get the SVG tag, ignore the rest 95 var $svg = jQuery(data).find('svg'); 96 97 // Add replaced image's ID to the new SVG 98 if (typeof imgID !== 'undefined') { 99 $svg = $svg.attr('id', imgID); 100 } 101 // Add replaced image's classes to the new SVG 102 if (typeof imgClass !== 'undefined') { 103 $svg = $svg.attr('class', imgClass + ' replaced-svg'); 104 } 105
106 // Remove any invalid XML tags as per http://validator.w3.org 107 $svg = $svg.removeAttr('xmlns:a'); 108 109 // Check if the viewport is set, if the viewport is not set the SVG wont't scale. 110 if (!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) { 111 $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width')) 112 } 113 114 // Replace image with new SVG 115 $img.replaceWith($svg); 116 117 }, 'xml'); 118 119 }); 120// }); 121// })(jQuery, this); 122var getUrlParameter = function getUrlParameter(sParam) { 123 var sPageURL = window.location.search.substring(1), 124 sURLVariables = sPageURL.split('&'), 125 sParameterName, 126 i; 127 128 for (i = 0; i < sURLVariables.length; i++) { 129 sParameterName = sURLVariables[i].split('='); 130 131 if (sParameterName[0] === sParam) { 132 return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); 133 } 134 } 135};
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.