Adding a gray area...
This commit is contained in:
parent
ed13808eb5
commit
3684c37ab7
|
|
@ -6,8 +6,9 @@ var scripts = document.getElementsByTagName('script'),
|
||||||
cdn = path.split('/').slice(0, -1).join('/') + '/';
|
cdn = path.split('/').slice(0, -1).join('/') + '/';
|
||||||
|
|
||||||
var tarteaucitron = {
|
var tarteaucitron = {
|
||||||
"showAlertSmall": true, // show the small banner on bottom right ?
|
"showAlertSmall": true, // show the small banner on bottom right?
|
||||||
"autoOpen": false, // auto open the panel with #tarteaucitron hash ?
|
"autoOpen": false, // auto open the panel with #tarteaucitron hash?
|
||||||
|
"grayArea": false, // activate the features of the gray area?
|
||||||
"cdn": cdn,
|
"cdn": cdn,
|
||||||
"user": {},
|
"user": {},
|
||||||
"lang": {},
|
"lang": {},
|
||||||
|
|
@ -184,7 +185,9 @@ var tarteaucitron = {
|
||||||
tarteaucitron.state[service.key] = false;
|
tarteaucitron.state[service.key] = false;
|
||||||
tarteaucitron.userInterface.color(service.key, false);
|
tarteaucitron.userInterface.color(service.key, false);
|
||||||
} else if (!isResponded) {
|
} else if (!isResponded) {
|
||||||
if (typeof service.fallback === 'function') {
|
if (typeof service.grayJs === 'function' && tarteaucitron.grayArea === true) {
|
||||||
|
service.grayJs();
|
||||||
|
} else if (typeof service.fallback === 'function') {
|
||||||
service.fallback();
|
service.fallback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,25 @@ tarteaucitron.services.analytics = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
"grayJs": function () {
|
||||||
|
"use strict";
|
||||||
|
window.GoogleAnalyticsObject = 'ga';
|
||||||
|
window.ga = window.ga || function () {
|
||||||
|
window.ga.q = window.ga.q || [];
|
||||||
|
window.ga.q.push(arguments);
|
||||||
|
};
|
||||||
|
window.ga.l = new Date();
|
||||||
|
|
||||||
|
tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
|
||||||
|
ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 86400});
|
||||||
|
ga('set', 'anonymizeIp', true);
|
||||||
|
ga('set', 'forceSSL', true);
|
||||||
|
ga('send', 'pageview');
|
||||||
|
if (typeof tarteaucitron.user.analyticsMore === 'function') {
|
||||||
|
tarteaucitron.user.analyticsMore();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
"fallback": function () {
|
"fallback": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
var cookies = ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'];
|
var cookies = ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue