PageSourceSearch

https://butterfly-conservation.org/themes/custom/hsb/js/custom_plugins.js?v=0.x

js butterfly-conservation.org collected 2026-09-24 08:59:07 UTC 1,941 bytes, 62 lines download raw bytes

1(function($) {
2
3  $.fn.contentQuery = function(a,b,c,d) {
4    a = typeof a !== 'undefined' ? a : 25;
5    b = typeof b !== 'undefined' ? b : 45;
6    c = typeof c !== 'undefined' ? c : 60;
7    d = typeof d !== 'undefined' ? d : 80;
8
9    $(this).each(function() {
10      $(this).removeClass('cq-small cq-medium cq-large cq-xl cq-xxl');
11      var fontsize = parseFloat($(this).css("font-size"));
12      var PXwidth = $(this).width();
13      var EMwidth = (PXwidth/fontsize);
14      if (EMwidth < a) {
15        $(this).addClass('cq-small');
16      } else if (EMwidth >= a && EMwidth < b) {
17        $(this).addClass('cq-medium');
18      } else if (EMwidth >= b && EMwidth < c) {
19        $(this).addClass('cq-large');
20      } else if (EMwidth >= c && EMwidth < d) {
21        $(this).addClass('cq-xl');
22      } else if (EMwidth >= d) {
23        $(this).addClass('cq-xxl');
24      }
25
26    });
27  };
28
29  $.fn.expandableLists = function() {
30
31    $(this).find('hr.collapsible').each(function(i, hr) {
32      var parent = $(this).parent();
33
34      $(hr).nextAll().each(function (x, sibling) {
35        $(sibling).addClass('expandable');
36        $(sibling).hide();
37      });
38      $(this).parent().append('<p class="expandlink"><a href="#"><img class="icon" src="/themes/custom/zuckerman/images/icon-expand.gif" /> Expand to read more</a></p><p class="collapselink" style="display: none;"><a href="#"><img class="icon" src="/themes/custom/zuckerman/images/icon-collapse.gif" /> Collapse</a></p>');
39
40      $('.expandlink', parent).on('click', function(){
41        $('.expandlink',parent).hide();
42        $('.collapselink',parent).show();
43
44        $(parent).find('.expandable').slideDown();
45
46        return false;
47      });
48
49      $('.collapselink', parent).on('click', function(){
50        $('.expandlink',parent).show();
51        $('.collapselink',parent).hide();
52
53        $(parent).find('.expandable').slideUp();
54
55        return false;
56      });
57
58    });
59
60  };
61
62})(jQuery);

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.