Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function() {
- var waitPageTriggerElement = setInterval(function() {
- var pageTriggerElements = document.querySelector('.coupon_info input[name="coupon_code"]');
- var currentCoupone = window.localStorage.getItem('adoric_coupone');
- var cuponeForm = document.querySelector('form[name="coupon_code_form_after"]');
- if (pageTriggerElements && currentCoupone) {
- clearInterval(waitPageTriggerElement);
- pageTriggerElements.value = currentCoupone;
- }
- if (cuponeForm) {
- cuponeForm.addEventListener('submit', function() {
- window.localStorage.removeItem('adoric_coupone');
- });
- }
- }, 1000);
- setTimeout(function() {
- clearInterval(waitPageTriggerElement);
- }, 10000);
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement