New uri for the commercial version

tarteaucitron.js will always remain free and open source
This commit is contained in:
Amauri CHAMPEAUX 2014-12-08 04:13:13 +01:00
parent fc4bce63da
commit 2e23d1f4e1
1 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,8 @@ var tarteaucitron = {
language = tarteaucitron.getLanguage(),
pathToLang = cdn + 'lang/tarteaucitron.' + language + '.js',
timestamp = new Date().getTime(),
pathToServices = cdn + 'tarteaucitron.services.js?c=' + encodeURIComponent(tarteaucitron.cookie.read()) + '&_' + timestamp,
pathToServices = cdn + 'tarteaucitron.services.js',
parametersCom = '?uuid=' + tarteaucitron.uuid + '&c=' + encodeURIComponent(tarteaucitron.cookie.read()) + '&_' + timestamp,
linkElement = document.createElement('link'),
defaults = {
"grayArea": false,
@ -37,6 +38,11 @@ var tarteaucitron = {
"showAlertSmall": true
};
// is the commercial version ?
if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined) {
pathToServices = pathToServices + parametersCom;
}
// Step 0: get params
if (params !== undefined) {
tarteaucitron.extend(defaults, params);