Bonjour,
je souhaite récupérer une propriété d'un objet contenu dans une fonction anonyme.

l'objet est tmParam, la propriété est country_code

Je ne peux pas changer ce script, uniquement en rajouter un appelé après celui ci. En gros je n'arrive pas a acceder à l'objet, est-il possible d'y acceder ou c'est peine perdue ?

merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
    <script>
 
    (function (w) {
 
        var tradeDoubler = '';
 
        if (jQuery.cookies && jQuery.cookies.get("TRADEDOUBLER") !== null) {
         tradeDoubler = "'" + jQuery.cookies.get("TRADEDOUBLER") + "'";
        }
        var encodedUriComponent = encodeURIComponent("f1=4&f2=Holidays&f3=1261&f4=1");
        w.tm2BootPosition = 0;
        w.tm2BootAsync = true;
        w.tmPageId = 11;
        w.tmParam = {
          start_date : '19/10/2015',
          partner_id_ : '0',
          td_event : '170911',
          country_code : 'IT',
          product_category_id : '66',
          td_uid : tradeDoubler,
          td_checksum : $().crypt({method:"md5",source:'9914' + 'OR1004394' + '1261'}),
          levrev : '1261',
          accom_code : '4',
          city_code : 'PMO',
          product_category_text : 'Holidays',
          td_reportinfo : encodedUriComponent,
          item_desc : 'Autotour Trinacria 3*',
          levordref : 'OR1004394',
          currency : 'EUR'};
 
        var conf = { host: 'pfa.levexis.com',
        version: '3',
        async: true,
        cdn: (location.protocol === 'https:') ? 'sec.levexis.com' : 'res.levexis.com',
        waitService: 'wt.tagman.com',
        waitTest: false,
        bootstrap: true,
        param: w.tmParam || {} };
 
        // do not change values below this line
        function ap(sr , ol) {
        var e = document.createElement('script');
        e.src = sr;
        e.async = true;
 
        if (ol) {
        e.onload = e.onerror = function() { if (!this.loaded) { ol(); this.loaded = true; } };
        e.onreadystatechange = function() { if (this.readyState === 'complete' || this.readyState === 'loaded') { this.onload(); } };
        }
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore( e , s);
        }
        w.TMAN = w.TMAN || {};
        w.TMAN.startTime = +new Date();
        w.TMAN.asyncLoader = function() {
        TMAN.addContainer( new TMAN.Container(conf.account, w.tmPageId, conf) );
        };
        var tm = '//' + conf.cdn + '/clientfiles/v' + conf.version + '/' + conf.account + '.js';
        if (conf.waitService && conf.waitTest) ap ( '//' + conf.waitService + '/wait/0/' + Math.random() , function() { TMAN.waitLatency=new Date() - TMAN.startTime; } );
        if (conf.async) {
        w.TMAN.position = {};
        w.TMAN.doTags = function(p) { TMAN.currentPosition = p; };
        w.TMAN.addParam = function(n,v) {
        w.tmParam[n]=v;
        };
        ap(tm);
        } else {
        document.write('<script src="' + tm + '"><\/script>');
        }
        })(window);
 
    </script>