1(function($){const CTCCoupon={init:function(){this._bind();},_bind:function(){$(document).on('click','.ctc-coupon-toggle-link',this.toggleDetails);$(document).on('click','.ctc-coupon-link',this.handleClick);},handleClick:function(event){event.preventDefault() 2const self=$(this) 3const parent=self.parents('.ctc-coupon') 4if(parent.hasClass('ctc-coupon-clicked')){return}const href=self.attr('href') 5const target=self.attr('target') 6const couponCode=parent.find('.ctc-coupon-code').text().trim()||'' 7console.log(couponCode) 8parent.addClass('ctc-coupon-clicked') 9CTCWP.copy(couponCode) 10window.open(href,target)},oldHandleClick:function(event){event.preventDefault();const self=$(this) 11const href=self.data('href') 12const target=self.data('target') 13const btn=self.find('.ctc-coupon-button') 14if(!self.hasClass('ctc-coupon-link-clicked')){window.open(href,target) 15self.addClass('ctc-coupon-link-clicked') 16btn.text('Copy Code')}if(self.hasClass('ctc-coupon-link-clicked')){self.addClass('ctc-coupon-link-copied') 17btn.text('Copied')}},toggleDetails:function(event){event.preventDefault();const self=$(this) 18const coupon=self.parents('.ctc-coupon') 19const details=coupon.find('.ctc-toggle-details') 20details.slideToggle('fast')}};$(function(){CTCCoupon.init();});})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.