X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/131d04d7a357f3d1c7f77f8f4931a96caee04d53..7a27a3fbc14b2049b8d110db15855a625e4c2455:/src/wolnelektury/static/js/book_text/references.js?ds=sidebyside

diff --git a/src/wolnelektury/static/js/book_text/references.js b/src/wolnelektury/static/js/book_text/references.js
index b9fc40f86..cdfc1f06f 100644
--- a/src/wolnelektury/static/js/book_text/references.js
+++ b/src/wolnelektury/static/js/book_text/references.js
@@ -37,6 +37,10 @@
     $('a.reference').each(function() {
         $this = $(this);
         uri = $this.attr('data-uri');
+        if (uri == '') {
+            $this.remove();
+            return;
+        }
         if (interestingReferences.hasOwnProperty(uri)) {
             $this.addClass('interesting');
             ref = interestingReferences[uri];
@@ -97,5 +101,7 @@
 
         $("#reference-link").text(ref.label);
         $("#reference-link").attr('href', ref.wikipedia_link);
+
+        _paq.push(['trackEvent', 'html', 'reference']);
     });
 })})(jQuery);