Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function () {
- function addKeyToStorage() {
- var NATIVE_UPSELL_BUTTON = document.querySelector('[bi-type="upsell go to cart(checkout) pdp"]');
- if (!NATIVE_UPSELL_BUTTON) {
- return;
- }
- NATIVE_UPSELL_BUTTON.addEventListener('click', function () {
- localStorage.setItem('nativeUpsellButtonClicked', window.location.href);
- });
- }
- if (document.readyState === 'loading') {
- document.addEventListener('DOMContentLoaded', addKeyToStorage);
- } else {
- addKeyToStorage();
- }
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement