1. Garage Door Style
Anonymous
JavaScript
10/31/2025 9:44 AM
1.8 KB
18
Indexable
Never
(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);
}
const texts = [
"Tilt-up operation",
"Tilt-up or roll-up operation",
"Tilt-up or roll-up operation",
"Tilt-up or roll-up operation"
];
/* Variation Init */
function init() {
/* start your code here */
document.body.classList.add('EG-A2OPGD');
document.querySelector(".content>div > div.container-fluid.parallax.pbg.p-t-b-25").classList.add("eg-garage-door");
const cardBodies = document.querySelectorAll('.card-body');
cardBodies.forEach((card, i) => {
const para = document.createElement('p');
para.className = 'eg-para';
para.textContent = texts[i] || "Tilt-up or roll-up operation";
card.appendChild(para);
});
const cards = document.querySelectorAll('.card');
if (cards.length >= 2) {
const span = document.createElement('span');
span.textContent = 'Most Popular';
span.className = 'eg-tag';
cards[1].appendChild(span);
}
}
/* Initialize variation */
waitForElement('.content>div > div.container-fluid.parallax.pbg.p-t-b-25', init, 50, 15000);
} catch (e) {
if (debug) console.log(e, "error in Test" + variation_name);
}
})();
Editor is loading...
Leave a Comment