PageSourceSearch

https://antada.com.vn/home/js/scripts.js?date=1626830276

js antada.com.vn collected 2026-09-24 14:28:59 UTC 6,312 bytes, 179 lines download raw bytes

1$(document).ready(function(){
2    $(document).on('click', '.popup-product', function (e) {
3        // load data khi mo modal
4        e.preventDefault();
5
6        if ($('#modal-product').length == 0) {
7            $( "body" ).append( '<div class="modal fade game-modal" id="modal-product" tabindex="-1" role="dialog" aria-hidden="true">'+
8                                '  <div class="modal-dialog modal-lg">'+
9                                '    <div class="modal-content" id="content_product">' +
10                                '    </div>'+
11                                '  </div>'+
12                                '</div>'+
13            '' );
14        }
15
16        var self = $(this),
17            modal = $('#modal-product');
18
19        self.loading();
20
21        modal.find('.modal-body').html('<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>');
22        modal.modal({
23            // keyboard: true, //option to close with keyboard
24            backdrop: "static" //ability to close modal with click
25        });
26
27        $.ajax({
28            url: self.attr('href'),
29            dataType: 'html',
30            success: function (res) {
31                // modal.data('bs.modal').options.backdrop = 'static';
32                modal.find('#content_product').html(res);
33                // modal.modal();
34                self.loading(false);
35            },
36            error: function (res) {
37                // modal.modal();
38                self.loading(false);            }
39        });
40    });
41
42    $(document).on('click', '.popup-recruitment', function (e) {
43        // load data khi mo modal
44        e.preventDefault();
45
46        var title = $(this).closest('.game-card-right').find('.short-hr-left').text();
47
48        //add size by class bootstrap: modal-lg
49        var popup_size = '';
50        if ($(this).data('size')) {
51            popup_size = $(this).data('size');
52        }
53
54        if ($('#modal-recruitment').length == 0) {
55            $( "body" ).append( '<div class="modal fade" id="modal-recruitment" tabindex="-1" role="dialog" aria-hidden="true">'+
56                                '  <div class="modal-dialog modal-lg">'+
57                                '    <div class="modal-content" id="content_recruitment">' +
58                                '    </div>'+
59                                '  </div>'+
60                                '</div>'+
61            '' );
62        }
63
64        var self = $(this),
65            modal = $('#modal-recruitment');
66
67        self.loading();
68
69        modal.find('.modal-body').html('<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>');
70        modal.modal({
71            // keyboard: true, //option to close with keyboard
72            backdrop: "static" //ability to close modal with click
73        });
74
75        $.ajax({
76            url: self.attr('href'),
77            dataType: 'html',
78            success: function (res) {
79                // modal.data('bs.modal').options.backdrop = 'static';
80                modal.find('#content_recruitment').html(res);
81                // modal.modal();
82                self.loading(false);
83            },
84            error: function (res) {
85                // modal.modal();
86                self.loading(false);            }
87        });
88    });
89
90    $(document).on('click', "#gameList a.page-link", function (e) {
91        e.preventDefault();
92        loadHtml($(this), '#gameList', '#nav-link-game');
93    });
94
95    $(document).on('click', ".product-type", function (e) {
96        e.preventDefault();
97        loadHtml($(this), '#gameList', '#nav-link-game');
98    });
99
100    $(document).on('click', "#full-row a.page-link", function (e) {
101        e.preventDefault();
102        loadHtml($(this), '#full-row', '#nav-link-team');
103    });
104
105    $(document).on('click', "#studioMedia a.page-link", function (e) {
106        e.preventDefault();
107        loadHtml($(this), '#studioMedia', '');
108    });
109
110    $(document).on('click', "#gameGuideList a.page-link", function (e) {
111        e.preventDefault();
112        loadHtml($(this), '#gameGuideList', '#nav-link-game-guide');
113    });
114});
115
116$.fn.loading = function(status) {
117    var self = $(this);
118    
119    if (self.length == 1 && self.prop('nodeName') == 'FORM') {
120        if (status === false) {
121            self.find('div.loading').remove();
122            self.find('button.btn').attr('disabled', false);
123        }
124        else {
125            var html = '<div class="loading" style="width: 100%;height: 100%;top: 0px;left: 0px;position: fixed;display: block;opacity: 0.5;background-color: transparent;z-index: 99;text-align: center;">'+
126                        '<div style="height: 48%"></div>'+
127//                        '<img src="'+BASE_URL+'/assets/images/loaders/loader6.gif" alt="waiting..." style="z-index: 100;">'+
128                    '</div>';
129            $(html).appendTo(self);
130            self.find('button').attr('disabled', true);
131        }  
132    }
133    else {
134        $.each(self, function(){
135            var self = $(this);
136            
137            if( self.prop('nodeName') == 'A' || self.prop('nodeName') == 'BUTTON' ) {
138                if (status === false) {
139                    self.button('reset');
140                }
141                else {
142                    self.data('loading-text', '<i class="fa fa-spinner fa-spin"></i> ' + (status || self.text()));
143                    self.button('loading');
144                }
145            }
146        }); 
147    }
148};
149
150function bsAlert(title) {
151    $('#alert-modal .modal-body').text(title);
152    $('#alert-modal').modal('show');
153}
154
155function loadHtml(obj, block, active) {
156    var url = $(obj).attr('href');
157
158    // var old_html = $('#gameList').html();
159    $.ajax({
160        url: url,
161        dataType: 'html',
162        success: function (html) {
163            $(block).html(html);
164            $(".js-video-button").modalVideo();
165
166            // LAZY LOADING IMAGES
167            new Blazy();
168            // self.loading(false);
169            if (active) {
170                $(active).trigger('click');
171            }
172        },
173        error: function (res) {
174            // $('#gameList').html(old_html);
175            // modal.modal();
176            // self.loading(false);            
177        }
178    });
179}

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.