Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.56 KB | None | 0 0
  1. <script id="stay22-script">
  2. document.addEventListener("DOMContentLoaded", function(e) {
  3.   var s22vars = JSON.parse($('[type="application/ld+json"]').html());
  4.  
  5.   // 1. Edit widget size
  6.   var settings22 = {
  7.       width:  '100%', // set the width in px or %
  8.       height: '460px' // set the height in px or %
  9.   };
  10.  
  11.   // 2. Fill out your config here and the rest should work
  12.   var s22obj = {
  13.     aid:       'fitevents',                    // your affiliate id for tracking
  14.     lat:   s22vars.geo.latitude , // Lat/Lng or full street address. For latlng use the "lat":,"lng": keys instead
  15.     lng:   s22vars.geo.longitude , // Lat/Lng or full street address. For latlng use the "lat":,"lng": keys instead
  16.     address:   s22vars.location.address.addressLocality,
  17.     checkin:   s22vars.startDate,                     // checkin date for their stay in MM/DD/YYYY or ISO 8601 format
  18.     checkout:   s22vars.endDate,                     // checkin date for their stay in MM/DD/YYYY or ISO 8601 format
  19.     maincolor: 'FC4A1A'                          // your main brand color in hex (without the #)
  20.   };
  21.  
  22.   // Leave this part as-is; it inserts the frame on your page
  23.   var params22=''; for (var key in s22obj){if (params22){params22 +='&';}params22 +=key + '=' + encodeURIComponent(s22obj[key]);}var div22=document.getElementById('stay22-script'); div22.insertAdjacentHTML('afterend', '<iframe id="stay22-widget" width="' + settings22.width + '" height="' + settings22.height + '" src="' + 'https://www.stay22.com/embed/gm?' + params22 + '" frameborder="0"></iframe>');
  24. });
  25. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement