PageSourceSearch

https://graylineargentina.com/resources/js/Filter.js?v=1791510227

js graylineargentina.com collected 2026-10-09 01:44:01 UTC 2,133 bytes, 74 lines download raw bytes

1class Filter
2{
3    constructor(instance, container, lang = 'eng')
4    {
5        this.instance = instance;
6        this.container = $(container);
7
8        switch(lang)
9        {
10            case 'esp':
11                this.traslations = {
12                    'buttons' : {
13                        'clear' : 'Limpiar',
14                    },
15                }
16                break;
17            case 'eng':
18                this.traslations = {
19                    'buttons' : {
20                        'clear' : 'Clear',
21                    },
22                }
23                break;
24            case 'por':
25                this.traslations = {
26                    'buttons' : {
27                        'clear' : 'Limpar',
28                    },
29                }
30                break;
31        };
32    }
33
34    show(filters)
35    {
36        var container = this.container;
37        var instance = this.instance;
38
39        this.clear();
40
41        var i = 0;
42
43        $(filters).each(function()
44        {
45            var col = $('<div></div>').addClass('col-lg-3');
46
47            var filterButton = $('<button></button>').addClass('close').attr({href: 'javascript:;', onclick:instance+'.deleteFilter("'+this+'")', 'data-dismiss':'alert', 'aria-label':'Close' }).html('<span aria-hidden="true">&times;</span>');
48
49            var filter = $('<div></div>').addClass('alert alert-primary alert-dismissible fade show').attr({role:'alert', id:'filter'+i}).html('<strong>'+this+'</strong>').append(filterButton);
50
51            col.append(filter);
52        
53            container.append(col);
54            
55            i++;
56        });
57
58        if(filters.length > 0)
59        {
60            var col = $('<div></div>').addClass('col-lg-3');
61
62            var clearButton = $('<button></button>').addClass('alert alert-light').attr({href: 'javascript:;', onclick:instance+'.clearFilters()',  }).text(this.traslations.buttons.clear);
63
64            col.append(clearButton);
65
66            this.container.append(col);
67        }
68    }
69
70    clear()
71    {
72        this.container.empty();
73    }
74}

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.