Skip to content

Commit 767f762

Browse files
Paul Boocockpaulboocock
authored andcommitted
Change deprecation strings to constants and reuse (close #791)
1 parent f3b479d commit 767f762

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/js/tracker.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@
18441844
* @return string The user fingerprint
18451845
*/
18461846
apiMethods.getUserFingerprint = function () {
1847-
helpers.warn('User Fingerprinting is no longer supported. This function will be removed in a future release.');
1847+
helpers.warn(userFingerprintingWarning);
18481848
return 0;
18491849
};
18501850

@@ -1854,7 +1854,7 @@
18541854
* @param int|string appId
18551855
*/
18561856
apiMethods.setAppId = function (appId) {
1857-
helpers.warn('setAppId is deprecated. Instead add an "appId" field to the argmap argument of newTracker.');
1857+
helpers.warn('setAppId' + argmapDeprecationWarning + 'appId');
18581858
core.setAppId(appId);
18591859
};
18601860

@@ -1912,7 +1912,7 @@
19121912
* @param string cookieNamePrefix
19131913
*/
19141914
apiMethods.setCookieNamePrefix = function (cookieNamePrefix) {
1915-
helpers.warn('setCookieNamePrefix is deprecated. Instead add a "cookieName" field to the argmap argument of newTracker.');
1915+
helpers.warn('setCookieNamePrefix' + argmapDeprecationWarning + 'cookieName');
19161916
configCookieNamePrefix = cookieNamePrefix;
19171917
};
19181918

@@ -1922,7 +1922,7 @@
19221922
* @param string domain
19231923
*/
19241924
apiMethods.setCookieDomain = function (domain) {
1925-
helpers.warn('setCookieDomain is deprecated. Instead add a "cookieDomain" field to the argmap argument of newTracker.');
1925+
helpers.warn('setCookieDomain' + argmapDeprecationWarning + 'cookieDomain');
19261926
configCookieDomain = helpers.fixupDomain(domain);
19271927
updateDomainHash();
19281928
};
@@ -1952,22 +1952,22 @@
19521952
* @param int timeout
19531953
*/
19541954
apiMethods.setSessionCookieTimeout = function (timeout) {
1955-
helpers.warn('setSessionCookieTimeout is deprecated. Instead add a "sessionCookieTimeout" field to the argmap argument of newTracker.')
1955+
helpers.warn('setSessionCookieTimeout' + argmapDeprecationWarning + 'sessionCookieTimeout');
19561956
configSessionCookieTimeout = timeout;
19571957
};
19581958

19591959
/**
19601960
* @param number seed The seed used for MurmurHash3
19611961
*/
19621962
apiMethods.setUserFingerprintSeed = function() {
1963-
helpers.warn('User Fingerprinting is no longer supported. This function will be removed in a future release.');
1963+
helpers.warn(userFingerprintingWarning);
19641964
};
19651965

19661966
/**
19671967
* Enable/disable user fingerprinting. User fingerprinting is enabled by default.
19681968
*/
19691969
apiMethods.enableUserFingerprint = function() {
1970-
helpers.warn('User Fingerprinting is no longer supported. This function will be removed in a future release.');
1970+
helpers.warn(userFingerprintingWarning);
19711971
};
19721972

19731973
/**
@@ -1978,7 +1978,7 @@
19781978
* @param bool enable If true and Do Not Track feature enabled, don't track.
19791979
*/
19801980
apiMethods.respectDoNotTrack = function (enable) {
1981-
helpers.warn('This usage of respectDoNotTrack is deprecated. Instead add a "respectDoNotTrack" field to the argmap argument of newTracker.');
1981+
helpers.warn('respectDoNotTrack' + argmapDeprecationWarning + 'respectDoNotTrack');
19821982
var dnt = navigatorAlias.doNotTrack || navigatorAlias.msDoNotTrack;
19831983

19841984
configDoNotTrack = enable && (dnt === 'yes' || dnt === '1');
@@ -2205,7 +2205,7 @@
22052205
* @param string platform Overrides the default tracking platform
22062206
*/
22072207
apiMethods.setPlatform = function(platform) {
2208-
helpers.warn('setPlatform is deprecated. Instead add a "platform" field to the argmap argument of newTracker.');
2208+
helpers.warn('setPlatform' + argmapDeprecationWarning + 'platform');
22092209
core.setPlatform(platform);
22102210
};
22112211

@@ -2216,7 +2216,7 @@
22162216
* @param bool enabled A boolean value indicating if the Base64 encoding for self-describing events should be enabled or not
22172217
*/
22182218
apiMethods.encodeBase64 = function (enabled) {
2219-
helpers.warn('This usage of encodeBase64 is deprecated. Instead add an "encodeBase64" field to the argmap argument of newTracker.');
2219+
helpers.warn('encodeBase64' + argmapDeprecationWarning + 'encodeBase64');
22202220
core.setBase64Encoding(enabled);
22212221
};
22222222

0 commit comments

Comments
 (0)