Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script id="stay22-script">
- document.addEventListener("DOMContentLoaded", function(e) {
- var s22vars = JSON.parse($('[type="application/ld+json"]').html());
- // 1. Edit widget size
- var settings22 = {
- width: '100%', // set the width in px or %
- height: '460px' // set the height in px or %
- };
- // 2. Fill out your config here and the rest should work
- var s22obj = {
- aid: 'fitevents', // your affiliate id for tracking
- lat: s22vars.geo.latitude , // Lat/Lng or full street address. For latlng use the "lat":,"lng": keys instead
- lng: s22vars.geo.longitude , // Lat/Lng or full street address. For latlng use the "lat":,"lng": keys instead
- address: s22vars.location.address.addressLocality,
- checkin: s22vars.startDate, // checkin date for their stay in MM/DD/YYYY or ISO 8601 format
- checkout: s22vars.endDate, // checkin date for their stay in MM/DD/YYYY or ISO 8601 format
- maincolor: 'FC4A1A' // your main brand color in hex (without the #)
- };
- // Leave this part as-is; it inserts the frame on your page
- 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>');
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement