PageSourceSearch

https://www.bimmerworld.com/site/getmelikes/2024FREESHIRT/getmelikes.js

js bimmerworld.com collected 2026-09-25 02:41:01 UTC 6,206 bytes, 156 lines download raw bytes

1/* JCookie */
2jQuery.cookie=function(key,value,options){if(arguments.length>1&&(value===null||typeof value!=="object")){options=jQuery.extend({},options);if(value===null){options.expires=-1;}
3if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
4return(document.cookie=[encodeURIComponent(key),'=',options.raw?String(value):encodeURIComponent(String(value)),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
5options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};
6
7
8	
9
10// begin get me likes
11(function($){ 
12	$.fn.getmelikes=function(vars){
13		var defaults={
14			element:this, // don't change.
15			likedpage:"https://www.facebook.com/bimmerworld", // should be from the facebook app domain entered.
16			couponID:"Couponid", // coupon offered
17			imgPath:"/site/getmelikes/2024FREESHIRT/", // imgbutton
18			defaulttext:"Like us on Facebook and get 10% off your order today! Already like us? Sign up for our mailing list to receive more promotions and savings!",
19			testmode: false,
20			couponTxt: "You can now save 10%!",
21			gmltheme: 0,
22			showfeature:1,
23			gmlposition:"bottom-left"
24		};
25		
26		var settings=$.extend({},defaults,vars);
27		
28		$("body").append("<img src='"+settings.imgPath+"actionbutton"+settings.gmltheme+".png' id='gmlfalseimg' style='display:none;' />");
29			
30		var positionx = "";
31		var positiony = "";
32		var transition = "";
33		var btnheight = $("#gmlfalseimg").height() / 2;
34		var btnwidth = $("#gmlfalseimg").width() / 2;
35		var screenh = $( window ).height() / 2;
36		var screenw = $( window ).height() / 2;
37		var screentot = screenh - btnheight;
38		var screentotw = screenw - btnwidth;
39		switch(settings.gmlposition){
40			case "top-right":
41				positionx = "right:0;";
42				positiony = "top:0;";
43				transition = "right";
44			break;
45			case "top-left":
46				positionx = "left:0;";
47				positiony = "top:0;";
48				transition = "left";
49			break;
50			case "middle-right":
51				positionx = "right:0;";
52				positiony = "top:"+ screentot + "px;";	
53				transition = "right";
54			break;
55			case "middle-left":
56				positionx = "left:0;";
57				positiony = "top:"+ screentot + "px;";		
58				transition = "left";
59				//alert(scrnheight);
60			break;
61			case "bottom-right":
62				positionx = "right:0;";
63				positiony = "bottom:0;";	
64				transition = "right";
65			break;
66			case "bottom-left":
67				positionx = "left:0;";
68				positiony = "bottom:0;";
69				transition = "left";
70			break;
71
72			case "bottom-middle":
73				positionx = "left:"+ screentotw + "px;";
74				positiony = "bottom:0;";
75				transition = "bottom";
76			break;
77		}
78		
79	if(settings.showfeature == 1){		
80			if(!$.cookie("fbliked") || settings.testmode){
81				if($(window).width() > 749){
82				  $(settings.element[0]).append("<div class='fblikecall gmltheme"+settings.gmltheme+"' style='"+transition+":-700px; "+positiony+"'><div id='fb-root'></div><div class='fb-like' data-href='"+settings.likedpage+"' data-layout='button' data-action='like' data-show-faces='false' data-share='false'></div><a href='/Team-Gear/Apparel/?promocode=freeshirt'><div class='dealtext'>SHOP NOW</div><a href='#' class='fblinkclose gm"+transition+"'><img src='"+settings.imgPath+"fbminimize.png' /></a><a class='fbhide'><img src='"+settings.imgPath+"fbclose.png' /></a></div><div class='fblink gmltheme"+settings.gmltheme+"' style='"+positionx+" "+positiony+"'><a href='#' class='fblaunch'><img src='"+settings.imgPath+"actionbutton"+settings.gmltheme+".png' /></a></div>");
83
84// Default Facebook JS
85  window.fbAsyncInit = function() {
86    // init the FB JS SDK
87	FB.init({
88	  version    : 'v2.0'
89});
90
91	FB.Event.subscribe('edge.create',
92	  function(response) {
93		  $(".showcoup").toggle();
94		  $(".fb-like").hide();
95		  $.cookie("fbliked","1",{expires:30,path:'/'});
96	  }
97    );
98  
99    FB.Event.subscribe('auth.login', function(response) {
100	  $(".showcoup").toggle();
101	  $(".fb-like").hide();
102	  $.cookie("fbliked","1",{expires:30,path:'/'});
103    });
104  };
105
106(function(d, s, id) {
107  var js, fjs = d.getElementsByTagName(s)[0];
108  if (d.getElementById(id)) return;
109  js = d.createElement(s); js.id = id;
110  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
111  fjs.parentNode.insertBefore(js, fjs);
112}(document, 'script', 'facebook-jssdk'));
113  
114				  
115				  
116				  $(".fblaunch").click(function(e){
117					  e.preventDefault();
118					  if(transition == "left"){
119						  $(".fblink").animate({left: "-700px"}, 1000, function(){$(".fblink").hide()});
120						  $(".fblikecall").animate({left: "0px"}, 500);
121					  } else if(transition == "bottom"){ 
122						  $(".fblink").animate({bottom: "-700px"}, 1000, function(){$(".fblink").hide()});
123						  $(".fblikecall").animate({bottom: "0px"}, 500);			  
124					  } else {
125						  $(".fblink").animate({right: "-700px"}, 1000, function(){$(".fblink").hide()});
126						  $(".fblikecall").animate({right: "0px"}, 500);				  
127					  }
128				  });
129				  $(".fblinkclose").click(function(e){
130					e.preventDefault();
131					if(transition == "left"){
132						$(".fblikecall").animate({left: "-700px"}, 500, function(){$(".fblink").show();});
133						$(".fblink").animate({left: "0px"}, 500);
134					} else if(transition == "bottom"){ 
135						$(".fblikecall").animate({bottom: "-700px"}, 500, function(){$(".fblink").show();});
136						$(".fblink").animate({bottom: "0px"}, 500);			
137					} else {
138						$(".fblikecall").animate({right: "-700px"}, 500, function(){$(".fblink").show();});
139						$(".fblink").animate({right: "0px"}, 500);				  
140					}
141				  });
142				  if(1==1){
143					  $(".showcoup").show();
144					  $(".fb-like").hide();
145				  }
146				  
147				  $(".fbhide").click(function(e){
148						e.preventDefault();
149						$.cookie("fbliked","1",{expires:30,path:'/'});
150						$(".fblikecall, .fblaunch").remove();
151				  });
152				}
153			}
154		}
155}	
156})(jQuery);

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.