Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function () {
- function addKeyToStorage() {
- var buttonAddToCart = document.querySelector('.add-all-to-cart');
- if (buttonAddToCart) {
- buttonAddToCart.addEventListener('click', function () {
- localStorage.setItem('adoricAddBundleToCart', true);
- });
- }
- }
- if (document.readyState === 'loading') {
- document.addEventListener('DOMContentLoaded', addKeyToStorage);
- } else {
- addKeyToStorage();
- }
- })();
- </script>
- <script>
- (function () {
- var isBundleInCart = localStorage.getItem('adoricAddBundleToCart');
- if (!isBundleInCart || isBundleInCart !== 'true') {
- adoric.trigger('showCampaign');
- }
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement