Untitled
unknown
plain_text
a year ago
4.9 kB
11
Indexable
;(function(){
var style=document.createElement('style');style.type='text/css';style.appendChild(document.createTextNode('html body .eg-herosection .eg-container { width: 100%; max-width: 1400px; margin: auto; display: flex; flex-direction: row; grid-gap: 15px; padding: 15px;}html body .eg-herosection .eg-container .eg-left { width: 100%; max-width: 465px;}html body .eg-herosection .eg-container .eg-right { width: 100%;}html body .eg-herosection .eg-container .eg-right .text-image-banner { padding: 80px 0; height: 100%; border-radius: 8px; /* max-height: 252px; */}html body .eg-herosection { margin-top: 60px;}html body .eg-herosection .eg-left .responsive-header__title { font-family: Open Sans, sans-serif !important; font-size: 36px; font-weight: 700; line-height: 43.57px; text-align: left; text-transform: capitalize; letter-spacing: 1px;}html body .eg-herosection .eg-left .responsive-header__breadcrumb { display: none;}html body .eg-herosection .eg-left>div:first-of-type .responsive-header { border: unset; padding: 0px !important;}html body .eg-herosection .eg-left>div:last-of-type p { font-family: Open Sans, sans-serif !important; font-size: 14px; font-weight: 400; line-height: 20.02px; text-align: left; color: #333333; margin: 0px !important;}@media only screen and (max-width:1024px) { html body .eg-herosection .eg-container .eg-right .text-image-banner { border-radius: 0; } html body .eg-herosection .eg-container { display: flex; flex-direction: column; padding-bottom: 0px !important; } html body .eg-herosection .eg-container .eg-left { width: 100%; max-width: 100%; } html body .eg-herosection .eg-left .responsive-header__title { letter-spacing: 0px !important; } html body .eg-herosection .eg-container .eg-right { order: -1; } html body .eg-herosection .eg-container { padding: 15px 0px !important; padding-top: 0px !important; } html body .eg-herosection .eg-container .eg-left>div:last-of-type { padding: 0px 10px; margin-top: 15px !important; } html body .eg-herosection .eg-left .responsive-header__title { font-size: 32px } html body .eg-herosection { margin-top: 0px; }}@media only screen and (min-width:1024px) { html body .eg-herosection .eg-left .wrapper { padding: 0px !important; }}'));document.head.appendChild(style);
(function () {
try {
/* main variables */
var debug = 0;
var variation_name = "";
var $;
/* all Pure helper functions */
function waitForElement(selector, trigger, delayInterval, delayTimeout) {
var interval = setInterval(function () {
if (
document &&
document.querySelector(selector) &&
document.querySelectorAll(selector).length > 0
) {
clearInterval(interval);
trigger();
}
}, delayInterval);
setTimeout(function () {
clearInterval(interval);
}, delayTimeout);
}
let heroHTML = `<div class="eg-herosection">
<div class="eg-container">
<div class="eg-left"></div>
<div class="eg-right"></div>
</div>
</div>`
/* Variation Init */
function init() {
let destionationSel = document.querySelector('.site-wrapper [data-selector="search-again"]');
let destionationPara = document.querySelector('.site-wrapper [data-selector="search-again"] + .wrapper > div:first-of-type');
let heroImage = document.querySelector('.site-wrapper .text-image-banner');
if (!document.querySelector('.eg-herosection')) {
document.querySelector('.site-wrapper .sticky-search-panel').insertAdjacentHTML('afterend', heroHTML);
document.querySelector('.eg-herosection .eg-right').insertAdjacentElement('beforeend', heroImage);
document.querySelector('.eg-herosection .eg-left').insertAdjacentElement('afterbegin', destionationSel);
document.querySelector('.eg-herosection .eg-left').insertAdjacentElement('beforeend', destionationPara);
}
// Changing text of heading
var headings = document.querySelectorAll('.site-wrapper > .wrapper h3.alpha');
headings.forEach(function (heading) {
if (heading.textContent.trim() === 'Destinations by country') {
heading.textContent = 'Destinations by country';
heading.style.setProperty('text-align', 'left', 'important');
}
});
}
/* Initialize variation */
waitForElement('.site-wrapper [data-selector="search-again"] + .wrapper > div:first-of-type', init, 50, 15000);
} catch (e) {
if (debug) console.log(e, "error in Test" + variation_name);
}
})();
})();
Editor is loading...
Leave a Comment