1(function ($) { 2 const pluginName = 'imgGuard'; 3 $.fn[pluginName] = function (options) { 4 const opt = $.extend($.fn[pluginName].defaults, options); 5 const targetArea = $(this.selector); 6 return this.each(function () { 7 $(this) 8 .wrap('<span class="itemGuard"></span>') 9 .before(`<span class="play"><img src="${opt.spacerSrc}" /></span>`); 10 $(this) 11 .parent('.itemGuard') 12 .find('img') 13 .bind('contextmenu', function () { 14 return false; 15 }); 16 if (typeof opt.zIndex === 'number') { 17 $(this).parent('.itemGuard').find('.play').css({ zIndex: opt.zIndex }); 18 } 19 }); 20 }; 21 $.fn[pluginName].defaults = { 22 spacerSrc: '/global/assets/images/parts/spacer.gif', 23 zIndex: false, 24 }; 25})(jQuery); 26// imgGuardå®è¡ 27jQuery(function ($) { 28 $('.guard').imgGuard(); 29});
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.