From 2e23d1f4e1a5450a26d87f23d3e85a2a5c4332c6 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 8 Dec 2014 04:13:13 +0100 Subject: [PATCH] New uri for the commercial version tarteaucitron.js will always remain free and open source --- tarteaucitron.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 2b68e39..3b0c54e 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -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);