PageSourceSearch

https://www.navymwrokinawa.com/_templates/components/global/js/com…?v=10974229963639268573159648387

js navymwrokinawa.com collected 2026-10-06 04:35:51 UTC 14,519 bytes, 350 lines download raw bytes

1jQuery(function () {
2    initCommonExternalLinks();
3    jQuery(".video-container").fitVids();
4    //remove google plus links
5    $('.icon-google-plus-1, a.google-plus, a.googleplus').closest('li').remove();
6    $('.icon-google-plus-1').remove();
7
8
9
10    function extractRootDomainForCommonExternalLinks(url) {
11
12        var a = document.createElement('a');
13        a.href = url;
14        var hostname = a.hostname.toLowerCase();
15        hostname = a.hostname.replace('http:', '').replace('https:', '').replace('/', '').replace('www.', '');
16
17        return hostname;
18    }
19
20    function initCommonExternalLinks() {
21
22        window.whitelistSites = [
23            'aafb.militarymwrguam.com',
24            'cnic.navy.mil',
25            'dineonthegocapecanaveral.com',
26            'dineonthegocorpuschristi.com',
27            'dineonthegofortworth.com',
28            'dineonthegogtmo.com',
29            'dineonthegoguantanamobay.com',
30            'dineonthegogulfport.com',
31            'dineonthegojacksonville.com',
32            'dineonthegokeywest.com',
33            'dineonthegokingsville.com',
34            'dineonthegomayport.com',
35            'dineonthegomeridian.com',
36            'dineonthegomidlant.com',
37            'dineonthegomidsouth.com',
38            'dineonthegoneworleans.com',
39            'dineonthegopanamacity.com',
40            'dineonthegopaxriver.com',
41            'dineonthegopensacola.com',
42            'dineonthegopnw.com',
43            'dineonthegowhitingfield.com',
44            'dodcio.defense.gov',
45            'dodwarriorgames.com',
46            'elcentroairshow.com',
47            'everett.navylifepnw.com',
48            'greatlifehawaii.com',
49            'kitsap.navylifepnw.com',
50            'militarymwrguam.com',
51            'mwrdigitallibrary.navy.mil',
52            'mywfr.com',
53            'nasjaxairshow.com',
54            'nasni100.com',
55            'naspensacolaairshow.com',
56            'navy.com',
57            'navy.mil',
58            'navybaybridgerun.com',
59            'navycyp.com',
60            'navyfitness.org',
61            'navygoldstar.com',
62            'navyhalf.com',
63            'navylifepnw.com',
64            'navymwr.org',
65            'navymwrannapolis.com',
66            'navymwratsugi.com',
67            'navymwrbahrain.com',
68            'navymwrbethesda.com',
69            'navymwrbusan.com',
70            'navymwrcapecanaveral.com',
71            'navymwrchinalake.com',
72            'navymwrchinhae.com',
73            'navymwrcorpuschristi.com',
74            'navymwrcrane.com',
75            'navymwrdahlgren.com',
76            'navymwrdiegogarcia.com',
77            'navymwrearle.com',
78            'navymwrelcentro.com',
79            'navymwrfallon.com',
80            'navymwrfortworth.com',
81            'navymwrgreatlakes.com',
82            'navymwrguantanamobay.com',
83            'navymwrgulfport.com',
84            'navymwrhamptonroads.com',
85            'navymwrindianhead.com',
86            'navymwrjacksonville.com',
87            'navymwrjapan.com',
88            'navymwrjblittlecreekfortstory.com',
89            'navymwrkeywest.com',
90            'navymwrkingsbay.com',
91            'navymwrkingsville.com',
92            'navymwrkorea.com',
93            'navymwrlemoore.com',
94            'navymwrmayport.com',
95            'navymwrmechanicsburg.com',
96            'navymwrmeridian.com',
97            'navymwrmidlant.com',
98            'navymwrmidsouth.com',
99            'navymwrmonterey.com',
100            'navymwrnaples.com',
101            'navymwrnavalstationnorfolk.com',
102            'navymwrndw.com',
103            'navymwrnewlondon.com',
104            'navymwrneworleans.com',
105            'navymwrnewport.com',
106            'navymwrnorfolkshipyard.com',
107            'navymwroceanadamneck.com',
108            'navymwrokinawa.com',
109            'navymwrpanamacity.com',
110            'navymwrpaxriver.com',
111            'navymwrpensacola.com',
112            'navymwrphiladelphia.com',
113            'navymwrportsmouthshipyard.com',
114            'navymwrrota.com',
115            'navymwrsandiego.com',
116            'navymwrsaratoga.com',
117            'navymwrsasebo.com',
118            'navymwrsealbeach.com',
119            'navymwrsigonella.com',
120            'navymwrsingapore.com',
121            'navymwrsolomons.com',
122            'navymwrsoudabay.com',
123            'navymwrsw.com',
124            'navymwrventura.com',
125            'navymwrwashington.com',
126            'navymwrwhitingfield.com',
127            'navymwryokosuka.com',
128            'navymwryorktown.com',
129            'navywoundedwarrior.com',
130            'nbg.militarymwrguam.com',
131            'ncis.navy.mil',
132            'neworleansairshow.com',
133            'oceanaairshow.com',
134            'paxriverairexpo.com',
135            'pmrf.greatlifehawaii.com',
136            'jbphh.greatlifehawaii.com',
137            'safehelpline.org',
138            'veteranscrisisline.net',
139            'www.veteranscrisisline.net',
140            'whidbey.navylifepnw.com',
141            'wingsoversouthtexas.com',
142            'chinalake.navylifesw.com',
143            'elcentro.navylifesw.com',
144            'fallon.navylifesw.com',
145            'lemoore.navylifesw.com',
146            'monterey.navylifesw.com',
147            'sandiego.navylifesw.com',
148            'sealbeach.navylifesw.com',
149            'ventura.navylifesw.com'
150
151        ];
152
153
154        if (window.ExternalLinkSettings && (window.ExternalLinkSettings.PartnerDomains.length || window.ExternalLinkSettings.WhitelistLinkDomains.length)) {
155            links = document.getElementsByTagName('A');
156            for (var i = 0; i < links.length; i++) {
157                if (links[i].href
158                    && links[i].href.indexOf(window.location.host) == -1
159                    && links[i].href.indexOf("mailto:") != 0
160                    && links[i].href != "#"
161                    && links[i].href.indexOf("javascript") != 0
162                    && (!$(links[i]).hasClass("bypass-external-link"))
163                ) {
164                    if (window.ExternalLinkSettings.PartnerDomains.indexOf(extractRootDomainForCommonExternalLinks(links[i].href.toLowerCase().trim())) > -1) {
165                        $(links[i]).addClass('partner-link');
166                        links[i].onclick = function () {
167                            return confirmPartnerLink(this.href);
168                        }
169                    }
170                    else if (window.ExternalLinkSettings.WhitelistLinkDomains.indexOf(extractRootDomainForCommonExternalLinks(links[i].href.toLowerCase().trim())) < 0) {
171                        $(links[i]).addClass('external-link');
172                        links[i].onclick = function () {
173                            return confirmExternalLink(this.href);
174                        }
175                    }
176                }
177            }
178        }
179        $('body').on('click', '.n9Ad a', function () {
180            return confirmExternalLink(this.href);
181        });
182    }
183    function confirmPartnerLink(href) {
184        if (confirm(window.ExternalLinkSettings.PartnerLinkMessage || "The appearance of external hyperlinks does not constitute endorsement by the United States Department of Defense, the United States Department of the Navy or U.S. Naval Observatory of the linked web sites, or the information, products or services contained therein. For other than authorized activities such as military exchanges and Morale, Welfare and Recreation (MWR) sites, the United States Department of Defense, the Department of the Navy or the U.S. Naval Observatory do not exercise any editorial control over the information you may find at these locations. Such links are provided consistent with the stated purpose of this DoD web site.")) {
185
186            var extLink = href.replace(/^https?\:\/\//i, '');
187
188            if (typeof gtag == 'function') {
189                gtag('event', 'Click', {
190                    'event_category': 'PartnerLink',
191                    'event_label': extLink
192                });
193            } else {
194                ga('send', 'event', 'PartnerLink', 'Click', extLink);
195            }
196
197            if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
198                setTimeout(function () { location.href = href; }, 200);
199                return false;
200            }
201
202
203            return true;
204        }
205        return false;
206    }
207
208
209    function confirmExternalLink(href) {
210
211        if (confirm(window.ExternalLinkSettings.ExternalLinkMessage || "The appearance of external hyperlinks does not constitute endorsement by the United States Department of Defense, the United States Department of the Navy or U.S. Naval Observatory of the linked web sites, or the information, products or services contained therein. For other than authorized activities such as military exchanges and Morale, Welfare and Recreation (MWR) sites, the United States Department of Defense, the Department of the Navy or the U.S. Naval Observatory do not exercise any editorial control over the information you may find at these locations. Such links are provided consistent with the stated purpose of this DoD web site.")) {
212
213            var extLink = href.replace(/^https?\:\/\//i, '');
214
215            if (typeof gtag == 'function') {
216                gtag('event', 'Click', {
217                    'event_category': 'ExternalLink',
218                    'event_label': extLink
219                });
220            } else {
221                ga('send', 'event', 'ExternalLink', 'Click', extLink);
222            }
223
224            if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
225                setTimeout(function () { location.href = href; }, 200);
226                return false;
227            }
228
229            //window.open(href, '_blank');
230            return true;
231        }
232        return false;
233
234    }
235    function checkExternalLinkAndGo(href) {
236        if (href
237            && href.indexOf(window.location.host) == -1
238            && href.indexOf("mailto:") != 0
239            && href != "#"
240            && href.indexOf("javascript") != 0
241        ) {
242            if (window.ExternalLinkSettings && window.ExternalLinkSettings.PartnerDomains.indexOf(extractRootDomainForCommonExternalLinks(href.toLowerCase().trim())) > -1) {
243
244                if (confirmPartnerLink(href)) {
245                    window.location.href = href;
246                }
247
248            }
249            else if (window.ExternalLinkSettings && window.ExternalLinkSettings.WhitelistLinkDomains.indexOf(extractRootDomainForCommonExternalLinks(href.toLowerCase().trim())) < 0) {
250
251                if (confirmExternalLink(href)) {
252                    window.location.href = href;
253                }
254
255            }
256            else {
257                window.location.href = href;
258            }
259        }
260        else {
261            window.location.href = href;
262        }
263    }
264    window.checkExternalLinkAndGo = checkExternalLinkAndGo;
265});
266
267
268
269/*global jQuery */
270/*jshint browser:true */
271/*!
272* FitVids 1.1
273*
274* Copyright 2013, Chris Coyier - https://css-tricks.com + Dave Rupert - https://daverupert.com
275* Credit to Thierry Koblentz - https://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
276* Released under the WTFPL license - https://sam.zoy.org/wtfpl/
277*
278*/
279
280(function ($) {
281
282    "use strict";
283
284    $.fn.fitVids = function (options) {
285        var settings = {
286            customSelector: null,
287            ignore: null,
288        };
289
290        if (!document.getElementById('fit-vids-style')) {
291            // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
292            var head = document.head || document.getElementsByTagName('head')[0];
293            var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
294            var div = document.createElement('div');
295            div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
296            head.appendChild(div.childNodes[1]);
297        }
298
299        if (options) {
300            $.extend(settings, options);
301        }
302
303        return this.each(function () {
304            var selectors = [
305                "iframe[src*='player.vimeo.com']",
306                "iframe[src*='youtube.com']",
307                "iframe[src*='youtube-nocookie.com']",
308                "iframe[src*='kickstarter.com'][src*='video.html']",
309                "object",
310                "embed"
311            ];
312
313            if (settings.customSelector) {
314                selectors.push(settings.customSelector);
315            }
316
317            var ignoreList = '.fitvidsignore';
318
319            if (settings.ignore) {
320                ignoreList = ignoreList + ', ' + settings.ignore;
321            }
322
323            var $allVideos = $(this).find(selectors.join(','));
324            $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
325            $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
326
327            $allVideos.each(function () {
328                var $this = $(this);
329                if ($this.parents(ignoreList).length > 0) {
330                    return; // Disable FitVids on this video.
331                }
332                if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
333                if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) {
334                    $this.attr('height', 9);
335                    $this.attr('width', 16);
336                }
337                var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(),
338                    width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
339                    aspectRatio = height / width;
340                if (!$this.attr('id')) {
341                    var videoID = 'fitvid' + Math.floor(Math.random() * 999999);
342                    $this.attr('id', videoID);
343                }
344                $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + "%");
345                $this.removeAttr('height').removeAttr('width');
346            });
347        });
348    };
349    // Works with either jQuery or Zepto
350})(window.jQuery || window.Zepto);

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.