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