{"title":"Lion Mega Campaign","description":"\u003cstyle\u003e.is-hidden {\n    display: none !important;\n}\n  \u003c\/style\u003e\n\u003cp\u003e\u003cscript\u003e\n    document.querySelector('.collection-hero')?.classList.add('is-hidden');\n  setTimeout(() =\u003e {\n  const heroImage = document.querySelector('.collection-hero__image-container');\n  \n  if (heroImage) {\n    \/\/ Option A: Make it disappear completely (no space taken)\n    heroImage.style.display = 'none';\n    \n    \/\/ Option B: Make it transparent (still takes up space)\n    \/\/ heroImage.style.opacity = '0';\n  }\n}, 250); \/\/ 3000ms = 3 seconds\n  const container = document.querySelector('.wbmain_bnr');\n\n\/\/ Create the new content (example: a new div)\nconst newElement = document.createElement('div');\nnewElement.innerHTML = `\n\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/Banner_Set_LiponF_Kaosaikai-LSO-10-12-apr.png?v=1774939710\" \n         style=\"display: block; width: 100%; height: auto; max-width: 100%; margin: 10px 0;\" \n         alt=\"Responsive Banner\"\u003e\n\u003ca href=\"https:\/\/lionshoponline.com\/pages\/lucky-draw\" target=\"_blank\" \u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/LION_57th_SIS.png?v=1774939710\" \n         style=\"display: block; width: 100%; height: auto; max-width: 100%; margin: 10px 0;\" \n         alt=\"Responsive Banner\"\u003e\u003c\/a\u003e\n\u003cdiv id=\"base_content\" class=\"container base_content\"\u003e\u003c\/div\u003e`;\n\n\/\/ Insert it after the container\ncontainer.after(newElement);\n\n\n  \n\u003c\/script\u003e\n\u003cscript src=\"https:\/\/cdn.jsdelivr.net\/npm\/sweetalert2@11\"\u003e\u003c\/script\u003e\u003c\/p\u003es\n\u003cstyle\u003e\n    .base_content {\n        border-radius: 12px;\n        padding: 4.5px;\ndisplay: flex;\n    flex-direction: row !important;\n    flex-wrap: wrap;\n    align-content: center !important;\n    align-items: center !important;\n    justify-content: center !important;\n   img {\n        zoom: 0.7;\n        border: none !important;\n        border-radius: unset !important;\n        padding:4.5px;\n        min-height: 192px;\n        max-height: 135px;\n        min-width: 175px;\n        max-width: 238px;\n    } \n}\n    @media screen and (max-width: 800px) {\n .base_content {\n      -ms-overflow-style: none;  \/* IE and Edge *\/\n      scrollbar-width: none;  \/* Firefox *\/\n      display: flex !important;\n      flex-direction: row;\n      flex-wrap: nowrap !important;\n      gap: 0px;\n      overflow: auto;\n      scroll-behavior: smooth;\njustify-content: flex-start !important;\n  img {\n        zoom: 0.7;\n        border: none !important;\n        border-radius: unset !important;\n        padding:4.5px;\n        min-height: 131px;\n        max-height: 135px;\n        min-width: 175px;\n        max-width: 280px;\n    } \n }\n    .base_content::-webkit-scrollbar {\n        display: none;\n    }\n\n}\n    .rte img {\n        border: none !important;\n        border-radius: unset !important;\n    }\n    .image_link {\n        cursor: pointer;\n    }\n  \n\u003c\/style\u003e\n\n\n\u003cscript\u003e\n    var loadData = [\n       \n      {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/LIONGIFT57.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"LIONGIFT57\"\n            }\n        },\n      {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/LIONAPR1.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"LIONAPR1\"\n            }\n        },\n         {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/LIONAPR2.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"LIONAPR2\"\n            }\n        },\n       {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/LIONAPR3.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"LIONAPR3\"\n            }\n        },\n         {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/B2BAPR10.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"B2BAPR10\"\n            }\n        },\n       {\n            \"image\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/B2BAPR12.png?v=1741922126\",\n            \"size\": 33.3,\n            \"data\": {\n                \"link\": \"\",\n                \"code\": \"B2BAPR12\"\n            }\n        }\n        \n    ]\n\n\n    function clickEvent(click_action, action_data) {\n        console.log(\"click action : \", click_action,action_data)\n        if (click_action == 'code') {\n            navigator.clipboard.writeText(action_data.code)\n                .then(() =\u003e {\n                    \/\/alert('โค้ดถูกคัดลอกแล้ว!');\n                    Swal.fire({\n                        title:\"\",\n                        text: \"[ \" + action_data.code + \" ] โค้ดถูกคัดลอกแล้ว!\",\n                        icon: \"success\",\n                        confirmButtonColor: \"#0f9f4d\",\n                    });\n                })\n                .catch(err =\u003e {\n                    console.error('ไม่สามารถคัดลอกโค้ดได้:', err);\n                    \/\/alert('ไม่สามารถคัดลอกโค้ดได้ กรุณาคัดลอกด้วยตนเอง');\n                });\n        }\n        if (click_action == 'link') {\n            if (action_data.link != '') {\n                window.location = action_data.link\n            }\n            \n        }\n\n    }\n\n    function imgClick() {\n        var elements = document.getElementsByClassName('image_link');\n\n        \/\/ Loop through the elements and add an onclick event to each\n        for (var i = 0; i \u003c elements.length; i++) {\n            elements[i].addEventListener('click', function (evt) {\n                var el = evt['srcElement']\n                var action = el.attributes['data-link']['value'] ? 'link' : 'code'\n                clickEvent(\n                    action, {\n                    link: el.attributes['data-link'] ? el.attributes['data-link']['value'] : undefined,\n                    code: el.attributes['data-code'] ? el.attributes['data-code']['value'] : undefined\n                })\n            });\n\n            \n        }\n    }\n\n    var base_el = document.getElementById('base_content')\n\n    for (var i = 0; i \u003c loadData.length; i++) {\n        var lData = loadData[i]\n        var element = document.createElement('img');\n        element.setAttribute('src', lData.image)\n        \n        for (var n = 0; n \u003c Object.keys(lData.data).length; n++) {\n            var key = Object.keys(lData.data)[n]\n            element.setAttribute('width', lData.size+'%')\n            element.setAttribute('data-' + key, lData['data'][key])\n            if (lData['data'][key] \u0026\u0026 key == 'link') {\n                element.setAttribute('class', 'image_link')\n            }\n            if (lData['data'][key] \u0026\u0026 key == 'code') {\n                element.setAttribute('name','Discount:'+lData['data'][key])\nelement.setAttribute('class', 'image_link')\n            }\n        }     \n\n        base_el.appendChild(element)\n\n        if (i == loadData.length - 1) {\n            imgClick()\n        }\n    }\n\n\n\n    \/\/Run ZONE\n\n\u003c\/script\u003e","products":[{"product_id":"b2b-lipon-f-dishwashing-liquid-x-tra-hygienic-3000ml-4-gallons","title":"[ยกลัง] Lipon F X-tra Hygienic น้ำยาล้างจาน ไลปอนเอฟ เอ็กซ์ตร้า ไฮจีนิค 3,000 มล. 4 แกลลอน","description":"\u003cp\u003e\u003cspan data-sheets-root=\"1\"\u003e[ยกลัง] Lipon F X-tra Hygienic น้ำยาล้างจาน ไลปอนเอฟ เอ็กซ์ตร้า ไฮจีนิค 3,000 มล. 4 แกลลอน\u003c\/span\u003e\u003c\/p\u003e","brand":"LION Shop Online","offers":[{"title":"Default Title","offer_id":46191337341140,"sku":"4P_FLPFX003L0","price":529.0,"currency_code":"THB","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/NEW_Lipon-F_3_000ml-10.jpg?v=1775639686"},{"product_id":"exclusive-set-4-1","title":"( Exclusive Set 4+1) Lipon F น้ำยาล้างจาน ไลปอนเอฟ สูตร X-tra Hygienic 1,700 มล. 1 แกลลอนปั๊ม + ถุงเติม 500 มล. 3 ถุง  แถมฟรี De Paris 1 ถุง น้ำยาปรับผ้านุ่ม สูตร BLOOMING ชนิดถุงเติม 490 มล.","description":"\u003cp\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cspan data-sheets-root=\"1\"\u003e( Exclusive Set 4+1) Lipon F น้ำยาล้างจาน ไลปอนเอฟ สูตร X-tra Hygienic 1,700 มล. 1 แกลลอนปั๊ม + ถุงเติม 500 มล. 3 ถุง แถมฟรี De Paris 1 ถุง น้ำยาปรับผ้านุ่ม สูตร BLOOMING ชนิดถุงเติม 490 มล.\u003c\/span\u003e\u003c\/p\u003e","brand":"LION Shop Online","offers":[{"title":"Default Title","offer_id":47767241457876,"sku":"1P-3P_FLPFX1.7L0_FLPFX500C60R3_QFDASB490CR0","price":169.0,"currency_code":"THB","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/files\/th-11134207-81ztj-mm7ciu4n3oy7fe_resize_w900_nl.jpg?v=1775535833"}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0739\/5367\/3428\/collections\/LSO_4.4_SIS_6af0686a-6039-4f9f-aa41-4f11e83d5cdd.png?v=1775638944","url":"https:\/\/lionshoponline.com\/collections\/lion-mega-campaign.oembed","provider":"LION Shop Online","version":"1.0","type":"link"}