Skip to Content

JavaScript File

URL: https://top-fwz1.mail.ru/js/dyn-goal-config.js?ids=3123790
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Mon, 01 Jan 1601 00:00:00 GMT
Download Time: Less than a second
Cookies: None
Size: 4 KB
HTTP Headers:  17 headers
Links In:  1 pages
OK Issues: No issues found

1(function(){function E(a,c,b,e){c||(c=1E3);var f;return function(){var g=e||this,d=arguments;b&&!f&&a.apply(g,d);k.clearTimeout(f);f=k.setTimeout(function(){!b&&a.apply(g,d);f=null}

2,c)}

3}

4function t(a,c){var b=c?p.NODE_LIST:p.NODE_ITEM;try{var e=document.evaluate(a,document,null,b,null);switch(e.resultType){case p.NODE_ITEM:return e.singleNodeValue;case p.NODE_LIST:for(var b=[],f=0,g=e.snapshotLength;f<g;f++)b.push(e.snapshotItem(f));return b;default:u&&console.warn("[tmr-dyn-goals] Error#1","Unsupported XPathResultType",

5e.resultType)}

6}

7catch(d){u&&console.warn("[tmr-dyn-goals] Error#2",d)}

8return null}

9function w(a){a=a.textContent.replace(/\s+/g,"").match("(^(?:\\d+(?:\\,|\\.)?\\d*)|(?:\\d*(?:\\,|\\.)?\\d+))(?:[^0-9]*$)|(?:^[^0-9]*)((?:\\d+(?:\\,|\\.)?\\d*)|(?:\\d*(?:\\,|\\.)?\\d+))(?:[^0-9]*$)");if(!a||void 0===a[1]&&void 0===a[2])return null;a=(a[1]||a[2]).split(/\,|\./);a=parseFloat((a[0]||0)+"."+(a[1]||0));return isNaN(a)?null:a}

10function x(){for(var a=0,c=q.length;a<c;a++)y(q[a])}

11function y(a,c){var b;if(void 0===

12c){if(Array.isArray(a.conditions)){b=0;for(var e=a.conditions.length;b<e;b++)y(a,b);return}

13c=0;b=t(a.conditions.target,!0)}

14else b=t(a.conditions[c].target,!0);if(b){a._node=a._node||[];a._node[c]=a._node[c]||{}

15;a._node[c].target=a._node[c].target||[];for(var e=0,f=b.length;e<f;e++){var g=b[e],d;a:{d=a._node[c].target;for(var h=0,k=d.length;h<k;h++)if(d[h]===g){d=!0;break a}

16d=!1}

17d||(a._node[c].target.push(g),F(a,c,g))}

18}

19}

20function F(a,c,b){b.addEventListener("click",G.bind(this,a,c))}

21function G(a,c){if(!v){for(var b=

22{id:a.id,type:"reachGoal",goal:a.goal}

23,e=0,f=r.length;e<f;e++){var g=b,d=a,h=c,m=r[e],n=d._node[h][m.key],l=void 0;Array.isArray(d.conditions)?l=d.conditions[h][m.key]:0===h&&(l=d.conditions[m.key]);!n&&l&&(n=t(l),!z&&n&&(d._node[h][m.key]=n));n&&(d._data=d._data||[],d._data[h]=d._data[h]||{}

24,l=d._data[h][m.key],l||(l=m.parseFn(n),!z&&l&&(d._data[h][m.key]=l)),l&&m.pushFn(g,l))}

25u&&console.info("[tmr-dyn-goals]: Reach goal",b);(k._tmr||(k._tmr=[])).push(b)}

26}

27function H(a){if(!v){a:{for(var c={}

28,b=0,

29e=a.length;b<e;b++){var f=a[b];f.addedNodes&&f.addedNodes.length&&(c.added=!0);!s&&(f.removedNodes&&f.removedNodes.length)&&(c.removed=!0);if(c.added&&(s||c.removed)){a=c;break a}

30}

31a=c}

32a.added&&x();if(!s&&a.removed){a=0;for(c=q.length;a<c;a++)A(q[a])}

33}

34}

35var k=window,B=document,C=location,u="string"===typeof C.search&&-1!=C.search.search(/[?&]tmr_debug=1(?:&|$)/),z=!0,s=!1,q=[],v=!1,p={NODE_ITEM:XPathResult.FIRST_ORDERED_NODE_TYPE,NODE_LIST:XPathResult.ORDERED_NODE_SNAPSHOT_TYPE}

36,r=[{key:"value",

37parseFn:w,pushFn:function(a,c){a.value=c}

38}

39,{key:"productid",parseFn:w,pushFn:function(a,c){a.params={product_id:c}

40}

...

</html>