MediaWiki:Common.js: differenze tra le versioni

mNessun oggetto della modifica
mNessun oggetto della modifica
 
(37 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
/* QUANTCAST GDPR*/
/* InMobi Choice. Consent Manager Tag v3.0 (for TCF 2.2) */
     
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1;
    var elem = document.createElement('script');
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
    elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
(function() {
    elem.async = true;
  var host = 'wikidonca.it';
elem.defer = true;  
  var element = document.createElement('script');  
    elem.type = "text/javascript";
  var firstScript = document.getElementsByTagName('script')[0];
    var scpt = document.getElementsByTagName('script')[0];
  var url = 'https://cmp.inmobi.com'
    scpt.parentNode.insertBefore(elem, scpt);
    .concat('/choice/', 'hK2b6w2mQ7J22', '/', host, '/choice.js?tag_version=V3');
    (function() {
  var uspTries = 0;  
     var gdprAppliesGlobally = true;
  var uspTriesLimit = 3;  
     function addFrame() {
  element.async = true;  
        if (!window.frames['__cmp.Locator']) {
  element.type = 'text/javascript';  
         if (document.body) {
  element.src = url;  
            var body = document.body,
 
                iframe = document.createElement('iframe');
  firstScript.parentNode.insertBefore(element, firstScript);  
            iframe.style = 'display:none';
 
            iframe.name = '__cmpLocator';
  function makeStub() {  
            body.appendChild(iframe);
     var TCF_LOCATOR_NAME = '__tcfapiLocator';
         } else {
    var queue = [];
            // In the case where this stub is located in the head,
    var win = window;
            // this allows us to inject the iframe more quickly than
    var cmpFrame;  
            // relying on DOMContentLoaded or other events.
 
             setTimeout(addFrame, 5);
     function addFrame() {  
         }
      var doc = win.document;
         }
      var otherCMP = !!(win.frames[TCF_LOCATOR_NAME]);
    }
 
    addFrame();
      if (!otherCMP) {  
     function cmpMsgHandler(event) {
         if (doc.body) {  
        var msgIsString = typeof event.data === "string";
          var iframe = doc.createElement('iframe');  
        var json;
 
         if(msgIsString) {
          iframe.style.cssText = 'display:none';  
        json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {};
          iframe.name = TCF_LOCATOR_NAME;  
         } else {
          doc.body.appendChild(iframe);  
        json = event.data;
         } else {  
         }
          setTimeout(addFrame, 5);
        if (json.__cmpCall) {
        }
        var i = json.__cmpCall;
      }
         window.__cmp(i.command, i.parameter, function(retValue, success) {
      return !otherCMP;
             var returnMsg = {"__cmpReturn": {
    }
            "returnValue": retValue,
 
            "success": success,
    function tcfAPIHandler() {
            "callId": i.callId
      var gdprApplies;
             }};
      var args = arguments;
             event.source.postMessage(msgIsString ?
 
            JSON.stringify(returnMsg) : returnMsg, '*');
      if (!args.length) {
         });
        return queue;
        }
      } else if (args[0] === 'setGdprApplies') {
     }
        if (
     window.__cmp = function (c) {
          args.length > 3 &&
        var b = arguments;
          args[2] === 2 &&
         if (!b.length) {
          typeof args[3] === 'boolean'
        return __cmp.a;
        ) {
         }
          gdprApplies = args[3];
        else if (b[0] === 'ping') {
          if (typeof args[2] === 'function') {
         b[2]({"gdprAppliesGlobally": gdprAppliesGlobally,
             args[2]('set', true);  
            "cmpLoaded": false}, true);
          }
        } else if (c == '__cmp')
         }  
        return false;
      } else if (args[0] === 'ping') {
        else {
        var retr = {
         if (typeof __cmp.a === 'undefined') {
          gdprApplies: gdprApplies,
            __cmp.a = [];
          cmpLoaded: false,
         }
          cmpStatus: 'stub'
        __cmp.a.push([].slice.apply(b));
        };
        }
 
    };
        if (typeof args[2] === 'function') {
    window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally;
          args[2](retr);
     window.__cmp.msgHandler = cmpMsgHandler;
         }  
     if (window.addEventListener) {
      } else {
        window.addEventListener('message', cmpMsgHandler, false);
        if(args[0] === 'init' && typeof args[3] === 'object') {
     }
          args[3] = Object.assign(args[3], { tag_version: 'V3' });
    else {
        }  
        window.attachEvent('onmessage', cmpMsgHandler);
        queue.push(args);  
     }
      }
    })();
    }
    window.__cmp('init', {
 
    'Language': 'it',
     function postMessageEventHandler(event) {  
'Initial Screen Title Text': 'Il rispetto della tua privacy è la nostra priorità',
      var msgIsString = typeof event.data === 'string';  
'Initial Screen Reject Button Text': 'NON ACCETTO',
      var json = {};  
'Initial Screen Accept Button Text': 'ACCETTO',
 
'Initial Screen Purpose Link Text': 'Mostra finalità',
      try {
'Purpose Screen Title Text': 'Il rispetto della tua privacy è la nostra priorità',
         if (msgIsString) {  
'Purpose Screen Body Text': 'Di seguito puoi impostare le preferenze sul consenso e determinare come desideri utilizzare i dati in base alle finalità. Puoi impostare le tue preferenze per noi indipendentemente da quelle dei partner di terze parti. Ogni finalità ha una descrizione in modo che tu sappia come noi e i nostri partner utilizziamo i tuoi dati.',
          json = JSON.parse(event.data);  
'Purpose Screen Vendor Link Text': 'Visualizza i fornitori',
         } else {  
'Purpose Screen Cancel Button Text': 'Annullare',
          json = event.data;  
'Purpose Screen Save and Exit Button Text': 'Salva ed Esci',
         }  
'Vendor Screen Title Text': 'Il rispetto della tua privacy è la nostra priorità',
      } catch (ignore) {}
'Vendor Screen Body Text': 'Di seguito puoi impostare le preferenze sul consenso per i singoli partner di terze parti con cui collaboriamo. Per visualizzare le finalità rispetto alle quali i singoli partner di terze parti usano i dati per agevolarti nelle tue scelte, espandi ogni voce dell'elenco di aziende. In alcuni casi, le aziende potrebbero utilizzare i tuoi dati senza chiedere il tuo consenso, in base ai loro legittimi interessi. Per ulteriori informazioni e per opporti a tale elaborazione, puoi fare clic sui rispettivi link alla policy sulla privacy.',
 
'Vendor Screen Accept All Button Text': 'ACCETTA TUTTO',
      var payload = json.__tcfapiCall;  
'Vendor Screen Reject All Button Text': 'RIFIUTA TUTTO',
 
'Vendor Screen Purposes Link Text': 'Torna alle finalità',
      if (payload) {
'Vendor Screen Cancel Button Text': 'Annullare',
         window.__tcfapi(  
'Vendor Screen Save and Exit Button Text': 'Salva ed Esci',
          payload.command,  
'Initial Screen Body Text': 'Wikidonca utilizza dei cookie tecnici per ricordare le tue preferenze durante la navigazione del sito. Il sito usa anche cookies di memorizzati da Google relativamente ai banner di Google AdSense e al monitoraggio statistico di Google Analytics. Fai clic su Accetta oppure continua la navigazione scorrendo la pagina per acconsentire all' utilizzo dei cookies. Puoi cambiare idea e modificare le tue opzioni sul consenso in qualsiasi momento ritornando su questo sito.',
          payload.version,  
'Initial Screen Body Text Option': 1,
          function(retValue, success) {  
'Publisher Name': 'Wikidonca',
             var returnMsg = {  
'Publisher Logo': 'https://wikidonca.it/img/wiki.png',
              __tcfapiReturn: {  
'Display UI': 'always',
                returnValue: retValue,  
'Publisher Purpose IDs': [1,2],
                success: success,  
'Publisher Purpose Legitimate Interest IDs': [1,2],
                callId: payload.callId  
'Post Consent Page': 'https://www.facebook.com/wikidonca',
              }
'Consent Scope': 'service',
             };  
'UI Layout': 'banner',
             if (msgIsString) {
'Soft Opt-in Enabled': true,
              returnMsg = JSON.stringify(returnMsg);
  });
            }
/* FINE QUANTCAST GDPR*/
            if (event && event.source && event.source.postMessage) {
              event.source.postMessage(returnMsg, '*');  
            }
          },
          payload.parameter
         );  
      }  
     }  
 
     while (win) {  
      try {
         if (win.frames[TCF_LOCATOR_NAME]) {  
          cmpFrame = win;
          break;  
         }  
      } catch (ignore) {}
 
      if (win === window.top) {  
         break;
      }
      win = win.parent;
    }
    if (!cmpFrame) {  
      addFrame();
      win.__tcfapi = tcfAPIHandler;
      win.addEventListener('message', postMessageEventHandler, false);
    }
  }  
 
  makeStub();
 
  var uspStubFunction = function() {
    var arg = arguments;  
    if (typeof window.__uspapi !== uspStubFunction) {
      setTimeout(function() {  
         if (typeof window.__uspapi !== 'undefined') {  
          window.__uspapi.apply(window.__uspapi, arg);  
         }  
      }, 500);  
    }  
  };  
 
  var checkIfUspIsReady = function() {
     uspTries++;
     if (window.__uspapi === uspStubFunction && uspTries < uspTriesLimit) {  
      console.warn('USP is not accessible');  
     } else {  
      clearInterval(uspInterval);  
     }  
  };  
 
  if (typeof window.__uspapi === 'undefined') {  
    window.__uspapi = uspStubFunction;
    var uspInterval = setInterval(checkIfUspIsReady, 6000);
  }
})();
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0;  
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0;
(adsbygoogle = window.adsbygoogle || []).push({});