Vai al contenuto

MediaWiki:Common.js: differenze tra le versioni

Da Wikidonca.
Creata pagina con "/* Il codice JavaScript inserito qui viene caricato da ciascuna pagina, per tutti gli utenti. /*<!-- Quantcast Choice. Consent Manager Tag --> /*<script type="text/javascript..."
 
mNessun oggetto della modifica
 
(53 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
/* Il codice JavaScript inserito qui viene caricato da ciascuna pagina, per tutti gli utenti.
/* InMobi Choice. Consent Manager Tag v3.0 (for TCF 2.2) */
/*<!-- Quantcast Choice. Consent Manager Tag -->
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1;
/*<script type="text/javascript" async=true> */
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
    var elem = document.createElement('script');
(function() {
    elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
  var host = 'wikidonca.it';
    elem.async = 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 = false;
  var uspTriesLimit = 3;  
     function addFrame() {
  element.async = true;  
        if (!window.frames['__cmpLocator']) {
  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&#039;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': 'Noi e i nostri partner utilizziamo tecnologie, quali quelle dei cookie, ed elaboriamo i dati personali, quali gli indirizzi IP e gli identificatori dei cookie, per personalizzare gli annunci e i contenuti in base ai tuoi interessi, misurare le prestazioni di annunci e contenuti e ricavare informazioni sul pubblico che ha visualizzato gli annunci e i contenuti. Fai clic sotto per acconsentire all&#039; utilizzo di questa tecnologia e al trattamento dei tuoi dati personali per queste finalità. 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: {  
'Publisher Purpose IDs': [2,5],
                returnValue: retValue,  
'Consent Scope': 'service',
                success: success,  
'No Option': false,
                callId: payload.callId  
'Soft Opt-in Enabled': true,
              }
    });
             };  
             if (msgIsString) {
              returnMsg = JSON.stringify(returnMsg);
            }
            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({});

Versione attuale delle 18:56, 7 ott 2025

/* InMobi Choice. Consent Manager Tag v3.0 (for TCF 2.2) */
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1; 
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;										
(function() { 
  var host = 'wikidonca.it'; 
  var element = document.createElement('script'); 
  var firstScript = document.getElementsByTagName('script')[0]; 
  var url = 'https://cmp.inmobi.com' 
    .concat('/choice/', 'hK2b6w2mQ7J22', '/', host, '/choice.js?tag_version=V3'); 
  var uspTries = 0; 
  var uspTriesLimit = 3; 
  element.async = true; 
  element.type = 'text/javascript'; 
  element.src = url; 

  firstScript.parentNode.insertBefore(element, firstScript); 

  function makeStub() { 
    var TCF_LOCATOR_NAME = '__tcfapiLocator'; 
    var queue = []; 
    var win = window; 
    var cmpFrame; 

    function addFrame() { 
      var doc = win.document; 
      var otherCMP = !!(win.frames[TCF_LOCATOR_NAME]); 

      if (!otherCMP) { 
        if (doc.body) { 
          var iframe = doc.createElement('iframe'); 

          iframe.style.cssText = 'display:none'; 
          iframe.name = TCF_LOCATOR_NAME; 
          doc.body.appendChild(iframe); 
        } else { 
          setTimeout(addFrame, 5); 
        } 
      } 
      return !otherCMP; 
    } 

    function tcfAPIHandler() { 
      var gdprApplies; 
      var args = arguments; 

      if (!args.length) { 
        return queue; 
      } else if (args[0] === 'setGdprApplies') { 
        if ( 
          args.length > 3 && 
          args[2] === 2 && 
          typeof args[3] === 'boolean' 
        ) { 
          gdprApplies = args[3]; 
          if (typeof args[2] === 'function') { 
            args[2]('set', true); 
          } 
        } 
      } else if (args[0] === 'ping') { 
        var retr = { 
          gdprApplies: gdprApplies, 
          cmpLoaded: false, 
          cmpStatus: 'stub' 
        }; 

        if (typeof args[2] === 'function') { 
          args[2](retr); 
        } 
      } else { 
        if(args[0] === 'init' && typeof args[3] === 'object') { 
          args[3] = Object.assign(args[3], { tag_version: 'V3' }); 
        } 
        queue.push(args); 
      } 
    } 

    function postMessageEventHandler(event) { 
      var msgIsString = typeof event.data === 'string'; 
      var json = {}; 

      try { 
        if (msgIsString) { 
          json = JSON.parse(event.data); 
        } else { 
          json = event.data; 
        } 
      } catch (ignore) {} 

      var payload = json.__tcfapiCall; 

      if (payload) { 
        window.__tcfapi( 
          payload.command, 
          payload.version, 
          function(retValue, success) { 
            var returnMsg = { 
              __tcfapiReturn: { 
                returnValue: retValue, 
                success: success, 
                callId: payload.callId 
              } 
            }; 
            if (msgIsString) { 
              returnMsg = JSON.stringify(returnMsg); 
            } 
            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({});