Untitled
unknown
plain_text
2 years ago
32 kB
5
Indexable
window.egProducts = { "PRINCE X VACATION BALL BOY SCENTED CANDLE": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/prince-cap", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgxNzU5MjU1Mw==" } ] }, "VACATION BY VACATION": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "WELLTIPPED POOL BOY": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "VACATION AIR FRESHENER": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "CLASSIC LOTION SPF 30": { "comp-products": [{ "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" } ] }, "CLASSIC WHIP SPF 30": { "comp-products": [{ "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "VACATION BY VACATION BLACK LABEL": { "comp-products": [{ "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" } ] }, "CHARDONNAY OIL SPF 30": { "comp-products": [{ "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" } ] }, "HIGH CEILING RESORT LOBBY": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/suite-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMTkyMzgxNw==" } ] }, "LIP DESSERTS 5X COLLECTORS SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" } ] }, "VACATION BY VACATION LUXURY DUO": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/classic-spray-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjgxNDk4MTMwODY0OQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "HOME RESORT THREE CANDLE SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/black-label-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80NDA3MzAxMTY3NTM2OQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" } ] }, "CLASSIC SPRAY SPF 30": { "comp-products": [{ "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" } ] }, "LUXURY SIGNATURE FRAGRANCE SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/black-label-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80NDA3MzAxMTY3NTM2OQ==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" } ] }, "SUPER SPRITZER": { "comp-products": [{ "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/classic-spray-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjgxNDk4MTMwODY0OQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "VACATION SUMMER LEISURE PACK": { "comp-products": [{ "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "PRINCE X VACATION CAP": { "comp-products": [{ "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" } ] }, "LUXURY SAMPLE SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "VACATION AIR FRESHENER PACK OF 4": { "comp-products": [{ "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" }, { "url": "https://www.vacation.inc/products/black-label-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80NDA3MzAxMTY3NTM2OQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "VACATION CLASSIC WHIP AIR FRESHENER": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/chardonnay-air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MzAyOTc0MTYzMzc2OQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "AFTER DINNER MINT": { "comp-products": [{ "url": "https://www.vacation.inc/products/strawberry-jello-salad", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODI4MjEyNDUyMQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "STRAWBERRY JELLO SALAD": { "comp-products": [{ "url": "https://www.vacation.inc/products/after-dinner-mint", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODMyOTc2OTE5Mw==" }, { "url": "https://www.vacation.inc/products/bananas-foster", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODIzNDM4MTU0NQ==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" } ] }, "VACATION AIR FRESHENER VARIETY PACK PACK OF 4": { "comp-products": [{ "url": "https://www.vacation.inc/products/black-label-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80NDA3MzAxMTY3NTM2OQ==" }, { "url": "https://www.vacation.inc/products/lobby-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMDkwODAwOQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "LUXURY DESSERT BAR SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "PARTIAL OCEAN VIEW SUITE": { "comp-products": [{ "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/lobby-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMDkwODAwOQ==" }, { "url": "https://www.vacation.inc/products/ball-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80Mzc2NDgyODMwNzY4OQ==" } ] }, "VACATION CHARDONNAY AIR FRESHENER": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/classic-whip-air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MzUwNjI2NTc1MTc4NQ==" } ] }, "PINEAPPLE UPSIDEDOWN CAKE": { "comp-products": [{ "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/pool-boy-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjE0NzgwMzU5NDk4NQ==" }, { "url": "https://www.vacation.inc/products/scent", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTY3ODk5NTY2MDk3NA==" } ] }, "CLASSIC LOTION PACK OF 3": { "comp-products": [{ "url": "https://www.vacation.inc/products/air-freshener", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTUwNjU0OTU3MTc1OA==" }, { "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/classic-spray-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjgxNDk4MTMwODY0OQ==" } ] }, "LUXURY INDULGENCE SET": { "comp-products": [{ "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/black-label-candle", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80NDA3MzAxMTY3NTM2OQ==" }, { "url": "https://www.vacation.inc/products/strawberry-jello-salad", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODI4MjEyNDUyMQ==" } ] }, "BANANAS FOSTER": { "comp-products": [{ "url": "https://www.vacation.inc/products/strawberry-jello-salad", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODI4MjEyNDUyMQ==" }, { "url": "https://www.vacation.inc/products/after-dinner-mint", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODMyOTc2OTE5Mw==" }, { "url": "https://www.vacation.inc/products/pineapple-upside-down-cake", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODMzMTY2OTczNw==" } ] }, "MINERAL LOTION SPF 30": { "comp-products": [{ "url": "https://www.vacation.inc/products/chardonnay-oil-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxNTU3NTk5NDU0Mg==" }, { "url": "https://www.vacation.inc/products/sun-screen", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/classic-spray-spf-30", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjgxNDk4MTMwODY0OQ==" } ] }, "BOMBE ALASKA": { "comp-products": [{ "url": "https://www.vacation.inc/products/bananas-foster", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODIzNDM4MTU0NQ==" }, { "url": "https://www.vacation.inc/products/pineapple-upside-down-cake", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTM2NTU1NzMyMTkwMg==" }, { "url": "https://www.vacation.inc/products/strawberry-jello-salad", "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjQ0ODI4MjEyNDUyMQ==" } ] } } (function() { try { /* main variables */ var debug = 0; var variation_name = ""; function waitForElement(selector, trigger, delayInterval, delayTimeout) { var interval = setInterval(function() { if ( document && document.querySelector(selector) && document.querySelectorAll(selector).length > 0 && window.egProducts ) { clearInterval(interval); trigger(); } }, delayInterval); setTimeout(function() { clearInterval(interval); }, delayTimeout); } function live(selector, event, callback, context) { function addEvent(el, type, handler) { if (el.attachEvent) el.attachEvent("on" + type, handler); else el.addEventListener(type, handler); } this.Element && (function(ElementPrototype) { ElementPrototype.matches = ElementPrototype.matches || ElementPrototype.matchesSelector || ElementPrototype.webkitMatchesSelector || ElementPrototype.msMatchesSelector || function(selector) { var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; while (nodes[++i] && nodes[i] != node); return !!nodes[i]; }; })(Element.prototype); // live binding helper using matchesSelector function live(selector, event, callback, context) { addEvent(context || document, event, function(e) { var found, el = e.target || e.srcElement; while (el && el.matches && el !== context && !(found = el.matches(selector))) el = el.parentElement; if (found) callback.call(el, e); }); } live(selector, event, callback, context); } function listener() { /* These are the modifications: */ window.addEventListener("locationchange", function() { waitForElement('#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline', init, 50, 15000); }); history.pushState = ((f) => function pushState() { var ret = f.apply(this, arguments); window.dispatchEvent(new Event("pushstate")); window.dispatchEvent(new Event("locationchange")); return ret; })(history.pushState); history.replaceState = ((f) => function replaceState() { var ret = f.apply(this, arguments); window.dispatchEvent(new Event("replacestate")); window.dispatchEvent(new Event("locationchange")); return ret; })(history.replaceState); window.addEventListener("popstate", () => { window.dispatchEvent(new Event("locationchange")); }); } const egCompleMentoryHtml = ` <ul class="eg-comp-products"> </ul>`; live(['button', 'span', ".header__nav__count", ".eg-comp-product__cta"], 'click', function() { if (this.innerText.toUpperCase().indexOf("BAG") != -1) { waitForElement('#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline', init, 50, 15000); } else if ((this.classList.contains("eg-comp-product__cta")) || (this.parentElement.classList.contains("eg-comp-product__cta"))) { // add to cart functionality let varientId = this.accessKey || this.parentElement.accessKey; let varientName = this.closest(".eg-comp-product").querySelector(".eg-comp-product__name-price > span[hidden]").innerText; fetch("https://checkout.vacation.inc/api/2020-07/graphql", { "headers": { "accept": "application/json", "accept-language": "*", "content-type": "application/json", "sec-ch-ua": "\"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"108\", \"Google Chrome\";v=\"108\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"macOS\"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-site", "x-sdk-variant": "javascript", "x-sdk-version": "2.11.0", "x-shopify-storefront-access-token": "fe00875189b0e661fdcf65285171dc0f" }, "referrer": "https://www.vacation.inc/", "referrerPolicy": "strict-origin-when-cross-origin", "body": "{\"query\":\"fragment VariantFragment on ProductVariant { id,title,price,priceV2 { amount,currencyCode },presentmentPrices (first: 20) { pageInfo { hasNextPage,hasPreviousPage },edges { node { price { amount,currencyCode },compareAtPrice { amount,currencyCode } } } },weight,available: availableForSale,sku,compareAtPrice,compareAtPriceV2 { amount,currencyCode },image { id,src: originalSrc,altText },selectedOptions { name,value },unitPrice { amount,currencyCode },unitPriceMeasurement { measuredType,quantityUnit,quantityValue,referenceUnit,referenceValue } },fragment DiscountApplicationFragment on DiscountApplication { __typename,targetSelection,allocationMethod,targetType,value { ... on MoneyV2 { amount,currencyCode },... on PricingPercentageValue { percentage } },... on ManualDiscountApplication { title,description },... on DiscountCodeApplication { code,applicable },... on ScriptDiscountApplication { description },... on AutomaticDiscountApplication { title } },fragment AppliedGiftCardFragment on AppliedGiftCard { amountUsedV2 { amount,currencyCode },balanceV2 { amount,currencyCode },presentmentAmountUsed { amount,currencyCode },id,lastCharacters },fragment VariantWithProductFragment on ProductVariant { ...VariantFragment,product { id,handle } },fragment UserErrorFragment on UserError { field,message },fragment CheckoutUserErrorFragment on CheckoutUserError { field,message,code },fragment MailingAddressFragment on MailingAddress { id,address1,address2,city,company,country,firstName,formatted,lastName,latitude,longitude,phone,province,zip,name,countryCode: countryCodeV2,provinceCode },fragment CheckoutFragment on Checkout { id,ready,requiresShipping,note,paymentDue,paymentDueV2 { amount,currencyCode },webUrl,orderStatusUrl,taxExempt,taxesIncluded,currencyCode,totalTax,totalTaxV2 { amount,currencyCode },lineItemsSubtotalPrice { amount,currencyCode },subtotalPrice,subtotalPriceV2 { amount,currencyCode },totalPrice,totalPriceV2 { amount,currencyCode },completedAt,createdAt,updatedAt,email,discountApplications (first: 10) { pageInfo { hasNextPage,hasPreviousPage },edges { node { __typename,...DiscountApplicationFragment } } },appliedGiftCards { ...AppliedGiftCardFragment },shippingAddress { ...MailingAddressFragment },shippingLine { handle,price,priceV2 { amount,currencyCode },title },customAttributes { key,value },order { id,processedAt,orderNumber,subtotalPrice,subtotalPriceV2 { amount,currencyCode },totalShippingPrice,totalShippingPriceV2 { amount,currencyCode },totalTax,totalTaxV2 { amount,currencyCode },totalPrice,totalPriceV2 { amount,currencyCode },currencyCode,totalRefunded,totalRefundedV2 { amount,currencyCode },customerUrl,shippingAddress { ...MailingAddressFragment },lineItems (first: 250) { pageInfo { hasNextPage,hasPreviousPage },edges { cursor,node { title,variant { ...VariantWithProductFragment },quantity,customAttributes { key,value } } } } },lineItems (first: 250) { pageInfo { hasNextPage,hasPreviousPage },edges { cursor,node { id,title,variant { ...VariantWithProductFragment },quantity,customAttributes { key,value },discountAllocations { allocatedAmount { amount,currencyCode },discountApplication { __typename,...DiscountApplicationFragment } } } } } },mutation ($checkoutId:ID!,$lineItems:[CheckoutLineItemInput!]!) { checkoutLineItemsAdd (checkoutId: $checkoutId lineItems: $lineItems) { userErrors { ...UserErrorFragment },checkoutUserErrors { ...CheckoutUserErrorFragment },checkout { ...CheckoutFragment } } }\",\"variables\":{\"checkoutId\":\"" + readCookie('vacation_checkout_id') + "\",\"lineItems\":[{\"variantId\":\"" + varientId + "\",\"quantity\":1,\"customAttributes\":[{\"key\":\"_subtitle\",\"value\":\"" + varientName + "\"},{\"key\":\"_sc\",\"value\":\"undefined_undefined_undefined\"}]}]}}", "method": "POST", "mode": "cors", "credentials": "omit" }).then((response) => response.json()) .then((data) => { setCookie("openCart", true, 1); window.location.reload(); }) .catch((error) => { console.error('Error:', error); });; } else if ((this.innerText.toUpperCase() == "ADD") || (this.innerText.toUpperCase() == "REMOVE") || this.parentElement.classList.contains("cart__item__quantity")) { waitForElement('#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline', init, 3000, 15000); } else if (this.classList.contains("header__nav__count") || this.parentElement.classList.contains("header__nav__count")) { waitForElement('#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline', init, 50, 15000); } }); /* Variation Init */ function init() { /* start your code here */ document.querySelector(".eg-comp-products") && document.querySelector(".eg-comp-products").remove(); document.querySelector("#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline") && document.querySelector("#__next .cart > div:has(.cart__item ) >div>div:last-child > .upsells-headline").insertAdjacentHTML("afterend", egCompleMentoryHtml); fecthData(); } function shuffleArray(array) { let currentIndex = array.length, randomIndex; while (currentIndex != 0) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex--; [array[currentIndex], array[randomIndex]] = [ array[randomIndex], array[currentIndex] ]; } return array; } // for checking product name function fecthData() { waitForElement('#__next .cart .cart__item .cart__item__content >div >div >div >div .cart__content:nth-of-type(1)', function() { let egComp = []; let egTxts = document.querySelectorAll("#__next .cart .cart__item .cart__item__content >div >div >div >div .cart__content:nth-of-type(1)"); for (let i = 0; i < egTxts.length; i++) { // removing special characters and consequitive spaces before check let egTxt = egTxts[i].innerText.replace(/[^\w\s]/gi, '').replace(/\s+/g, ' ').toUpperCase(); let comp = window.egProducts[egTxt] && window.egProducts[egTxt]["comp-products"]; if (comp) { egComp = egComp.concat(comp); } }; egComp = shuffleArray(egComp); // console.log(egComp); // products skelton const egItemBox = document.querySelector(".eg-comp-products"); if (egComp) { // making request async function getData() { for (let i = 0; i < egComp.length; i++) { let url = egComp[i].url; let varientId = egComp[i].id; const response = await fetch(url); const responseText = await response.text(); const ele = document.createElement("div"); ele.innerHTML = responseText; const egName = ele.querySelector("#__next .shopping-block-pusher >div:nth-child(1) >div>h1").innerText; const egContext = ele.querySelector("#__next .shopping-block-pusher >div:nth-child(1) >div>h3:has(>span)").childNodes[0].textContent; const egPrice = ele.querySelector("#__next .shopping-block-pusher >div:nth-child(1) >div>h3:has(>span) > span").innerText; const egImg = ele.querySelector("#__next .embla .embla__slide img").src; // if comproduct is in cart list hiding it from suggestion let egIsPresent = contains("#__next .cart .cart__item .cart__item__content >div >div >div >div .cart__content:nth-of-type(1)", egName) if (egIsPresent.length <= 0 && !egItemBox.querySelector(`li[accesskey*="${varientId}"]`) && egItemBox.children.length < 3) { // console.log(egItemBox.children.length); egItemBox.insertAdjacentHTML("beforeend", ` <li class="eg-comp-product" id="eg-comp-${i}" accesskey="${varientId}"> <!-- complementory product image --> <div class="eg-comp-product__img"> <img src="${egImg}"/> </div> <!-- details and button --> <div class="eg-comp-product__details"> <p class="eg-comp-product__name-price"> Get <span class="eg-name">${egName}</span> for<span class="eg-price">${egPrice}</span> <span hidden>${egContext}</span> </p> <button class="eg-comp-product__cta" accesskey="${varientId}"> <span>ADD</span> </button> </div> </li>`); } else if (egItemBox.children.length === 3) { console.log("UPDATED"); break; } // updating product price in skeleton ele.remove(); } } getData(); } else { console.log("no complementory product found!!") } }, 50, 15000); } // searching element by text inside of it function contains(selector, text) { var elements = document.querySelectorAll(selector); return [].filter.call(elements, function(element) { // removing special characters and consequitive spaces before check return element.innerText.replace(/[^\w\s]/gi, '').replace(/\s+/g, ' ').toUpperCase().indexOf(text.replace(/[^\w\s]/gi, '').replace(/\s+/g, ' ').toUpperCase()) != -1; }); } // add to cart functionality function readCookie(name) { // READ COOKIE var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } var setCookie = function(name, value, days) { var expires = ''; if (days) { var date = new Date(); date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); expires = '; expires=' + date.toUTCString(); } document.cookie = name + '=' + (value || '') + expires + '; path=/'; }; var delCookie = function(name) { document.cookie = name + '=; Max-Age=0; path=/;'; } /* Initialize variation */ listener(); // if cokee exists then click on the bag btn if (readCookie("openCart")) { waitForElement(".header__nav > div > div > div:last-child button", function() { delCookie("openCart"); document.querySelector(".header__nav > div > div > div:last-child button").click(); }, 50, 15000); } } catch (e) { if (debug) console.log(e, "error in Test" + variation_name); } })();
Editor is loading...