Pubdirecte support
This commit is contained in:
parent
c11e9afd14
commit
c762ed3209
|
|
@ -1,4 +1,4 @@
|
||||||
/*jslint browser: true */
|
/*jslint browser: true, evil: true */
|
||||||
|
|
||||||
// define correct path for files inclusion
|
// define correct path for files inclusion
|
||||||
var scripts = document.getElementsByTagName('script'),
|
var scripts = document.getElementsByTagName('script'),
|
||||||
|
|
@ -415,6 +415,7 @@ var tarteaucitron = {
|
||||||
"use strict";
|
"use strict";
|
||||||
tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
|
tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
|
||||||
tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
|
tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
|
||||||
|
document.location.hash = '';
|
||||||
},
|
},
|
||||||
"openAlert": function () {
|
"openAlert": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -585,6 +586,7 @@ var tarteaucitron = {
|
||||||
"makeAsync": {
|
"makeAsync": {
|
||||||
"buffer": '',
|
"buffer": '',
|
||||||
"init": function (url, id) {
|
"init": function (url, id) {
|
||||||
|
"use strict";
|
||||||
var savedWrite = document.write,
|
var savedWrite = document.write,
|
||||||
savedWriteln = document.writeln;
|
savedWriteln = document.writeln;
|
||||||
|
|
||||||
|
|
@ -603,6 +605,7 @@ var tarteaucitron = {
|
||||||
tarteaucitron.makeAsync.getAndParse(url, id);
|
tarteaucitron.makeAsync.getAndParse(url, id);
|
||||||
},
|
},
|
||||||
"getAndParse": function (url, id) {
|
"getAndParse": function (url, id) {
|
||||||
|
"use strict";
|
||||||
tarteaucitron.addScript(url, '', function () {
|
tarteaucitron.addScript(url, '', function () {
|
||||||
document.getElementById(id).innerHTML += tarteaucitron.makeAsync.buffer;
|
document.getElementById(id).innerHTML += tarteaucitron.makeAsync.buffer;
|
||||||
tarteaucitron.makeAsync.buffer = '';
|
tarteaucitron.makeAsync.buffer = '';
|
||||||
|
|
@ -610,6 +613,7 @@ var tarteaucitron = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"execJS": function forceJsExec(id) {
|
"execJS": function forceJsExec(id) {
|
||||||
|
/* not strict because third party scripts may have errors */
|
||||||
var i,
|
var i,
|
||||||
scripts,
|
scripts,
|
||||||
childId,
|
childId,
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ tarteaucitron.services.criteo = {
|
||||||
"needConsent": true,
|
"needConsent": true,
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
"js": function () {
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
document.MAX_ct0 = '';
|
document.MAX_ct0 = '';
|
||||||
var criteoUri = '//cas.criteo.com/delivery/ajs.php?',
|
var criteoUri = '//cas.criteo.com/delivery/ajs.php?',
|
||||||
divId = 'criteo_' + tarteaucitron.user.criteoZoneId;
|
divId = 'criteo_' + tarteaucitron.user.criteoZoneId;
|
||||||
|
|
@ -574,6 +575,38 @@ tarteaucitron.services.pinterest = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// pubdirecte
|
||||||
|
tarteaucitron.services.pubdirecte = {
|
||||||
|
"key": "pubdirecte",
|
||||||
|
"type": "ads",
|
||||||
|
"name": "Pubdirecte",
|
||||||
|
"uri": "http://pubdirecte.com/contact.php",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": [],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
var pubdirecteUri = '//www.pubdirecte.com/script/banniere.php?',
|
||||||
|
divId = 'pubdirecte_' + tarteaucitron.user.pubdirecteId;
|
||||||
|
|
||||||
|
if (tarteaucitron.user.pubdirecteId === undefined || document.getElementById(divId) === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pubdirecteUri += 'id=' + tarteaucitron.user.pubdirecteId + '&ref=' + document.getElementById(divId).getAttribute('ref');
|
||||||
|
document.getElementById(divId).innerHTML = '';
|
||||||
|
tarteaucitron.makeAsync.init(pubdirecteUri, divId);
|
||||||
|
},
|
||||||
|
"fallback": function () {
|
||||||
|
"use strict";
|
||||||
|
var id = 'pubdirecte',
|
||||||
|
divId = id + '_' + tarteaucitron.user.pubdirecteId;
|
||||||
|
|
||||||
|
if (document.getElementById(divId)) {
|
||||||
|
document.getElementById(divId).innerHTML = tarteaucitron.engage(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// shareaholic
|
// shareaholic
|
||||||
tarteaucitron.services.shareaholic = {
|
tarteaucitron.services.shareaholic = {
|
||||||
"key": "shareaholic",
|
"key": "shareaholic",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue