PageSourceSearch

https://elusiveicons.com/assets/js/site.js

js elusiveicons.com collected 2026-10-02 04:31:59 UTC 2,994 bytes, 102 lines download raw bytes

1$(function() {
2  var ads = [
3    { quote: "Take your theme & plugin development to the next level.", content: "ad_1_next_level"},
4    { quote: "Join with the other devs who made over $10+ million in 2014.", content: "ad_2_all_value_add"},
5    { quote: "Don't just make a plugin or theme, make a solution.", content: "ad_3_faster_loading"},
6    { quote: "Stop reinventing the wheel, make cool things.", content: "ad_4_more_icons"},
7    { quote: "Need custom WordPress development?", content: "ad_5_custom_icons"}
8  ];
9
10  selectFonticonsAd();
11
12  // start the icon carousel
13  $('#icon-carousel').carousel({
14    interval: 5000
15  });
16
17  var $filter_by = $('#filter-by');
18
19  // Filter icons
20  if($filter_by.length) {
21    var $filter_val = $('#filter-val');
22    var $filter = $('#filter');
23    var $other = $('#new, #web-application, #transportation, #gender, #form-control, #medical, #currency, #text-editor, #directional, #video-player, #brand, #file-type, #spinner, #payment, #chart');
24    var $clear = $('#filter-clear');
25    var $no_results = $('#no-search-results');
26
27    var $icons = $('.filter-icon', $filter);
28
29    // Add tab completion
30    $filter_by.tabcomplete(filterSet, {
31      arrowKeys: true
32    });
33
34    $clear.on('click', function(e) {
35      e.preventDefault();
36      $filter_by
37        .val('')
38        .trigger('input')
39        .trigger('keyup')
40        .focus();
41
42      $clear.addClass('hide'); // Hide clear button
43    });
44
45
46    $filter_by.on('keyup', function() {
47      var $this = $(this);
48      var val = $this.val().toLowerCase();
49      $filter.toggle(!!val);
50      $other.toggle(!val);
51      $clear.toggleClass('hide', !val);
52      $filter_val.text(val);
53
54      if(!val) return;
55
56      var resultsCount = 0;
57      $icons.each(function() {
58        var filter = $(this).attr('data-filter').split('|');
59        var show = inFilter(val, filter);
60        if (!show) {
61          if (val.slice(-1) === 's') {
62            // Try to be smart. Make plural terms singular.
63            show = inFilter(val.slice(0, -1), filter);
64          }
65        }
66        if (show) resultsCount++;
67        $(this).toggle(!!show);
68      });
69
70      if( resultsCount == 0 && val.length != 0 ) {
71        $no_results.find('span').text(val);
72        $no_results.show();
73      } else {
74        $no_results.hide();
75      }
76    });
77  }
78
79  function inFilter(val, filter) {
80    for (var i = 0; i < filter.length; i++) {
81      if (filter[i].match(val)) return true;
82    }
83    return false;
84  }
85
86  $filter_by
87    .val('')
88    .trigger('input')
89    .trigger('keyup');
90
91  if ($clear) {
92    $clear.addClass('hide'); // Hide clear button
93  }
94
95  function selectFonticonsAd() {
96    random_number = Math.floor( Math.random() * ads.length );
97    random_ad = ads[random_number];
98
99    $('#rotating-message').html(random_ad.quote);
100    $('#rotating-url').attr("href", "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=" + random_ad.content + "&utm_campaign=promo_4.3_update");
101  }
102});

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.