PageSourceSearch

https://worldaircargoawards.com/wp-content/plugins/aircargoweek/js/acw.js?ver=1790703698

js worldaircargoawards.com collected 2026-10-04 13:23:27 UTC 5,953 bytes, 181 lines download raw bytes

1jQuery(document).ready(function(){
2    jQuery('a').each(function(){
3        if(jQuery(this).html().includes('AS#404') || jQuery(this).html().includes('AS#403')){
4            jQuery(this).css('display', 'none');
5        }
6    });
7
8    var wd = window.screen.width;
9    //console.log('screen-width: ' + wd);
10    if(wd < 500){
11        jQuery('body').addClass('mobile');
12        console.log('mobile_viewer_found');
13    } else {
14        jQuery('body').removeClass('mobile');
15    }
16
17    console.log('Hiding Subs Form');
18    jQuery('.the_sub_form').first().hide();
19
20    //jQuery('#acw_logo_img_subform').html(digimage());
21    //jQuery('#acw_skim_img_subform').html(skimimage());
22
23    var popup_check_interval;
24    clear_empty_popup(popup_check_interval);
25    //check_publications_page_width_height();
26    //not needed now its handled by can_latest_issue_is_landing_request()
27    //in plugin file.
28
29      function scrollToHashWithOffset() {
30        if (!location.hash) return;
31
32        var id = location.hash.slice(1);
33        var el = document.getElementById(id);
34        if (!el) return;
35
36        // Adjust this to your mobile header height (try 80-120)
37        var headerOffset = 100;
38
39        var y = el.getBoundingClientRect().top + window.pageYOffset - headerOffset;
40        window.scrollTo({ top: y, behavior: "smooth" });
41      }
42
43      // First try when everything is loaded
44      window.addEventListener("load", function () {
45        scrollToHashWithOffset();
46
47        // Second try after late layout shifts (lazy images, fonts, etc.)
48        setTimeout(scrollToHashWithOffset, 600);
49      });
50
51      // Helpful on rotation / responsive header changes
52      window.addEventListener("orientationchange", function () {
53        setTimeout(scrollToHashWithOffset, 300);
54      });
55
56});
57
58function check_publications_page_width_height(){
59    jQuery('body.publications-template-default').css({
60        'width' : '100%',
61        'height' : '100%',
62        'min-width': '100%',
63        'min-height' : '100%'
64    });
65    jQuery('.publications').css({
66        'width' : '100%',
67        'height' : 'calc(100% - 34px)',
68        'min-width': '100%',
69        'min-height' : 'calc(100% - 34px)'
70    });
71    jQuery('.publications .elementor-element').css({
72        'width' : '100%',
73        'min-width': '100%',
74        'margin' : '0',
75        'padding' : '0'
76    });
77    jQuery('.publications .elementor-widget-jet-breadcrumbs').css({
78        'display' : 'none'
79    });
80    jQuery('.page-id-79105 .elementor-element-3590a6a').css({
81        'display' : 'none'
82    });
83    jQuery('.page-id-79105 .elementor-location-footer').css({
84        'display' : 'none'
85    });
86
87}
88
89//not used...
90jQuery(window).ready(function(){
91   setTimeout(function(){
92      jQuery('.mpMultipleInput').each(function(){
93             jQuery(this).prop('checked', true);
94      });
95      jQuery('input.submitButton').val('Subscribe');
96      jQuery('.mpMultipleLabel').each(function(){
97          if(jQuery(this).text().includes('Skim')){
98             jQuery(this).html('<span> The Skim Daily</span>');
99             jQuery(this).prepend(skimimage());
100          } else {
101             jQuery(this).html('<span> ACW Weekly</span>');
102             jQuery(this).prepend(digimage());
103          }
104      });
105   }, 4000);
106
107});
108
109function set_form_horizontal(single_column){
110    jQuery('.mpFormTable').first().attr('id', 'acw_collect_table');
111    var rows_length = jQuery('#acw_collect_table').find('.mpQuestionTable').length;
112    //console.log('number of rows: ' + rows_length);
113    var rows = jQuery('#acw_collect_table').find('.mpQuestionTable');
114    var horiz = document.createElement('table');
115    horiz.classList.add('horiz_form_table');
116    var tf = document.createElement('tbody');
117    var tr = document.createElement('tr');
118    var tdf = document.createElement('td');
119    var tds = document.createElement('td');
120    var half = rows_length/2;
121    for(i = 0; i<rows_length;i++){
122       var oh = jQuery('#acw_collect_table .mpQuestionTable')[i].outerHTML;
123       if(i < half || single_column == 1){
124           tdf.innerHTML = tdf.innerHTML + oh; //.prop('outerHTML'));
125           //tdf.append(oh.prop('outerHTML'));
126       } else {
127           tds.innerHTML = tds.innerHTML + oh; //.prop('outerHTML'));
128           //tds.append(oh.prop('outerHTML'));
129       }
130    }
131    tr.append(tdf);
132    tr.append(tds);
133    tf.append(tr);
134    horiz.append(tf);
135    jQuery('#acw_collect_table').find('td').first().html('');
136    jQuery('#acw_collect_table').find('td').first().append(horiz);
137    console.log('Showing Subs Form');
138    jQuery('.the_sub_form').first().show();
139}
140
141function skim_label(){
142    var lbl = document.createElement('span');
143    lbl.innerHTML = (skimimage() + ' The Skim Daily');
144    return lbl;
145}
146
147function acw_label(){
148    var lbl = document.createElement('span');
149    lbl.innerHTML = (digimage() + ' ACW Weekly');
150    return lbl;
151}
152
153function digimage(){
154    var im = document.createElement('img');
155    im.setAttribute('src', 'https://aircargoweek.com/wp-content/uploads/2024/03/ACW-brand-new-logo.png.webp');
156    im.setAttribute('width', '200');
157    //im.setAttribute('height', '110');
158    return im;
159}
160
161function skimimage(){
162    var im = document.createElement('img');
163    im.setAttribute('src', 'https://aircargoweek.com/wp-content/uploads/2024/04/the_skim.png.webp');
164    im.setAttribute('width', '200');
165    //im.setAttribute('height', '110');
166    return im;
167}
168
169function clear_empty_popup(interval){
170    interval = setInterval(function(){
171        jQuery('a').each(function(){
172            if(jQuery(this).html().includes('AS#404') || jQuery(this).html().includes('AS#403')){
173                if(jQuery(this).closest('.elementor-popup-modal').length){
174                    jQuery(this).closest('.elementor-popup-modal').remove();
175                    console.log('empty popup found and eliminated');
176                    clearInterval(interval);
177                }
178            }
179        });
180    }, 200);
181}

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.