PageSourceSearch

https://www.internet.org.lb/Style%20Library/AUB/js/AdditionalScriptsv2.js?v=14

js internet.org.lb collected 2026-09-29 21:36:56 UTC 6,374 bytes, 178 lines download raw bytes

1var vars = {
2  keyCode: {
3      escape: 27
4  },
5  breakpoints: {
6      lg: { min: 1200 },
7      md: { min:  992, max: 1199 },
8      sm: { min:  768, max:  991 },
9      xs: { min:  480, max:  767 }
10  },
11  mobileLevel3MenuHeight: 55,
12  windowWidth: 0,
13  windowHeight: 0,
14  isMobile: function() {
15      //return this.windowWidth <= this.breakpoints.xs.max;
16      return $(window).width() <= this.breakpoints.xs.max;
17  },
18  isMobileSearch: function() {
19      return this.windowWidth > this.breakpoints.xs.max;
20  },
21  // breakpoint for listing 2 resize, and for share menu
22  isMobileBreakpoint2: function(offset) {
23      return this.windowWidth <= this.breakpoints.sm.max + (offset || 0);
24  },
25  // breakpoint for listing 4 resize
26  isMobileBreakpoint3: function(offset) {
27      return this.windowWidth <= this.breakpoints.xs.min + (offset || 0);
28  }
29};
30
31function configureHomeRotator(){
32	$(".banner-main .slick").slick({
33        slidesToShow: 1,
34        slidesToScroll: 1,
35        centerMode: true,
36        centerPadding: "0",
37        dots: false,
38        autoplay: true,
39        autoplaySpeed: 5000,
40        prevArrow: '<a href="javascript:void(0);" class="slick-arrow slick-prev" aria-label="Previous image" title="Previous image"></a>',
41        nextArrow: '<a href="javascript:void(0);" class="slick-arrow slick-next" aria-label="Next image" title="Next image"></a>'
42    }).on("beforeChange", function (event, slick) {
43        var currentSlide, slideType, player, command;
44
45        //find the current slide element and decide which player API we need to use.
46        currentSlide = $(slick.$slider).find(".slick-current");
47
48        //determine which type of slide this, via a class on the slide container. This reads the second class, you could change this to get a data attribute or something similar if you don't want to use classes.
49        slideType = currentSlide.attr("class").split(" ")[1];
50
51        //get the iframe inside this slide.
52        player = currentSlide.find("iframe").get(0);
53
54        if (slideType === "vimeo") {
55            command = {
56                "method": "pause",
57                "value": "true"
58            };
59        } else {
60            command = {
61                "event": "command",
62                "func": "pauseVideo"
63            };
64        }
65
66        //check if the player exists.
67        if (player != undefined) {
68            //post our command to the iframe.
69            player.contentWindow.postMessage(JSON.stringify(command), "*");
70        }
71    });
72}
73
74function configureWideRotator(){
75	$(".banner-main .slick").slick({
76            lazyLoad: 'ondemand',
77            slidesToShow: 1,
78            slidesToScroll: 1,
79            centerMode: true,
80            centerPadding: "0",
81
82            dots: false,
83            autoplay: true,
84            autoplaySpeed: 5000,
85            prevArrow: '<a href="javascript:void(0);" class="slick-arrow slick-prev" aria-label="Previous image" title="Previous image"></a>',
86            nextArrow: '<a href="javascript:void(0);" class="slick-arrow slick-next" aria-label="Next image" title="Next image"></a>'
87        });
88}
89
90$(function(){
91    
92    if(window.location.pathname.toLowerCase().startsWith("/osb"))
93    {
94      window.addEventListener('load',function(){
95        jQuery('[href="http://website.aub.edu.lb/mcf/Pages/home.aspx"]').click(function(){
96          gtag('event', 'conversion', {'send_to': 'AW-816002744/tDHFCM7Vtn8QuO2MhQM'});
97        })
98    
99        jQuery('[href="https://graduateadmissions.aub.edu.lb/"]').click(function(){
100          gtag('event', 'conversion', {'send_to': 'AW-816002744/Nj2YCNfPtn8QuO2MhQM'});
101        })
102        jQuery('[href="/osb/MBA/Documents/MBAbrochure.pdf"]').click(function(){
103          gtag('event', 'conversion', {'send_to': 'AW-816002744/jCohCKWeyn8QuO2MhQM'});
104        })
105        if(window.location.pathname.indexOf('SpecializedMasters.aspx')!=-1){
106          jQuery('[href*=".pdf"]').click(function(){
107            gtag('event', 'conversion', {'send_to': 'AW-816002744/xySvCIbezX8QuO2MhQM'});
108          })
109        }
110      });
111    }
112      
113      
114      
115    window.addEventListener('load',function(){
116      
117        $(".banner-main a[href^='http://boldly.aub.edu.lb/']").on( "click", function() {
118          
119            gtag('event', 'click', { event_category: 'ExternalLink', event_action: 'click', event_label: 'Boldy Banner'})
120
121        });
122        
123        
124        $(".banner-main a[href$='/graduatecouncil/Pages/default.aspx']").on( "click", function() {
125            
126            gtag('event', 'click', { event_category: 'AUBHomeBanner', event_action: 'click', event_label: 'Graduate Council'})
127    
128        })
129        
130        
131        $(".banner-main a[href$='/osb/wids19/Pages/Registration.aspx']").on( "click", function() {
132            
133            gtag('event', 'click', { event_category: 'AUBHomeBanner', event_action: 'click', event_label: 'WIDS'})
134    
135        })
136        
137        
138        $(".banner-main a[href$='/streetview/#lebanon-highlights/american-university-of-beirut']").on( "click", function() {
139            
140            gtag('event', 'click', { event_category: 'AUBHomeBanner', event_action: 'click', event_label: 'Street View'})
141        })
142
143      })
144      
145    if(window.location.pathname.toLowerCase().startsWith("/advancement"))
146    {
147           jQuery('.rightnavsection').prepend('<div style="padding-bottom:20px"><a href="https://giving.aub.edu.lb/aub" target="_blank"><img src="/PublishingImages/Give-Now-buttonv2.png"/></a></div>')
148    }
149      
150    
151	if(isAnonymous){
152			window.cookieconsent.initialise({
153			  "palette": {
154			    "popup": {
155			      "background":"rgba(66, 67, 67, 0.9)"// "#d5e8f3"
156			    },
157			    "button": {
158			      "background": "#f1d600"
159			    }
160			  },
161			  /*"position": "top",
162			   "static": true,*/
163			  "content": {
164			    "message": "Our website uses cookies to analyze web traffic and provide a simple user interface.",
165			    "href": "/pages/cookies.aspx"
166			  },
167				onPopupOpen: function() {
168					var popupHeight = $(".cc-window").outerHeight();
169					$('#cookieconsent').height(popupHeight);
170			 	},
171			
172				onPopupClose: function() {
173					$('#cookieconsent').css('display','none');
174				}
175			});	
176	}
177      
178});

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.