From 9a8a48a15de56e7bc62992e9668a91e8739a9483 Mon Sep 17 00:00:00 2001 From: curben Date: Tue, 2 Oct 2018 12:10:31 +0930 Subject: [PATCH] Don't inject fancybox tag/class to cloudinary class Incompatible with cloudinary --- themes/typing/source/js/typing.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/typing/source/js/typing.js b/themes/typing/source/js/typing.js index b3ce8cf..edbfce1 100644 --- a/themes/typing/source/js/typing.js +++ b/themes/typing/source/js/typing.js @@ -1,8 +1,9 @@ (function ($) { - // Caption + // Fancybox caption $('.article-entry').each(function (i) { $(this).find('img').each(function () { - if ($(this).parent().hasClass('fancybox')) return + // Don't insert fancybox element to cloudinary's cld-responsive img class + if ($(this).hasClass('cld-responsive') || $(this).parent().hasClass('fancybox')) return var alt = this.alt @@ -22,6 +23,7 @@ $('.fancybox').fancybox() } + //Add "Copy" button to code snippet var code = document.getElementsByClassName('code');