Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((location.href.indexOf('sushi-lover.ru/trening_writing/')==-1) && location.href.indexOf(('/coupon/')==-1)) {
- $(function() {
- var fnInjectEvent = function(sSelector, sKey, sOp) {
- $(document).on('blur', sSelector, function() {
- //console.log(sSelector, this.value);
- carrotquest.identify([
- {
- op: sOp ? sOp : 'update_or_create',
- key: sKey,
- value: this.value
- }
- ]);
- });
- };
- var snames = [
- 'form input#NAME',
- 'input#cname',
- 'input[name*="Èìÿ"]',
- 'input[name*="name"]',
- 'input[name*="uName"]',
- 'input[name*="user_name"]'
- ],
- sphones = [
- 'form input#PHONE',
- 'input#cphone',
- 'input[name*="ÒåëåôîГ"]',
- 'input[name*="phone"]',
- 'input[name*="uPhone"]'
- ],
- semails = [
- 'form input#EMAIL',
- 'input#cemail',
- 'input[name*="Ïî÷òà "]',
- 'input[name*="mail"]',
- 'input[name*="uEmail"]',
- 'input[name*="email"]'
- ],
- stext = [
- 'input#ccmnt',
- //'textarea[name*="mess"]',
- //'textarea[name*="descr"]'
- 'textarea'
- ];
- fnInjectEvent(snames.join(','), '$name');
- fnInjectEvent(sphones.join(','), '$phone');
- fnInjectEvent(semails.join(','), '$email');
- fnInjectEvent(stext.join(','), 'text');
- //console.log('debug: carrot events hook injected');
- });
- (function() {
- init()
- function init() {
- setTimeout(addMouseout, 5000);
- }
- function addMouseout() {
- document.addEventListener('mouseout', mouseout);
- }
- function mouseout(e) {
- if (Math.round(e.x) >= 0 && Math.round(e.y) <= 0) {
- carrotquest.track('Ïîïûòêà óõîäà ñ ñà éòà ');
- deleteEvent();
- setTimeout(addMouseout, 10000);
- }
- }
- function deleteEvent() {
- document.removeEventListener('mouseout', mouseout);
- }
- }
- }());
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement