Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function () {
- if (document.readyState === 'loading') {
- document.addEventListener('DOMContentLoaded', clickHandler, true);
- } else {
- clickHandler();
- }
- function clickHandler() {
- var SKU = ['M10809999999', 'M08602999999'];
- document.body.addEventListener('click', function () {
- setTimeout(function () {
- var miniCart = document.querySelector('.popup-container-cart');
- if (miniCart) {
- products = document.querySelectorAll('.sku');
- if (products) {
- products.forEach(function (item) {
- if (item.textContent.includes(SKU[0]) || item.textContent.includes(SKU[1])) {
- adoric && adoric.trigger('oilMinicart');
- }
- });
- }
- } else {
- adoric.lightboxes.forEach(function (item) {
- if (item.isShowing && item.options.campaignId === self.campaignId) {
- item.close(4);
- }
- });
- }
- }, 200);
- }, true);
- }
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement