@financial-times/o-tracking
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -25,3 +25,3 @@ "use strict"; | ||
var isIe11 = function isIe11() { | ||
return !!window.MSInputMethodContext && !!document.documentMode; | ||
return Boolean(window.MSInputMethodContext) && Boolean(document.documentMode); | ||
}; | ||
@@ -28,0 +28,0 @@ /** |
@@ -28,3 +28,3 @@ { | ||
"name": "@financial-times/o-tracking", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Origami module for FT tracking.", | ||
@@ -41,2 +41,3 @@ "dependencies": { | ||
"devDependencies": { | ||
"eslint-config-origami-component": "^2.0.1", | ||
"origami-build-tools": "^7.2.0", | ||
@@ -43,0 +44,0 @@ "origami-ci-tools": "^1.0.0" |
@@ -6,3 +6,3 @@ import settings from './settings'; | ||
const isIe11 = function () { return !!window.MSInputMethodContext && !!document.documentMode; }; | ||
const isIe11 = function () { return Boolean(window.MSInputMethodContext) && Boolean(document.documentMode); }; | ||
/** | ||
@@ -79,3 +79,3 @@ * Default collection server. | ||
if (isIe11() && transport.name === 'xhr') { | ||
let image_method = transports.get('image')(); | ||
const image_method = transports.get('image')(); | ||
// Append image label to transport value so that we know it tried xhr first | ||
@@ -82,0 +82,0 @@ request.system.transport = [request.system.transport,image_method.name].join('-'); |
@@ -22,3 +22,3 @@ import Delegate from 'ftdomdelegate'; | ||
const oTrackingSkipQueueAttr = firstDomPathToken['data-o-tracking-skip-queue']; | ||
const skipQueue = (oTrackingSkipQueueAttr && oTrackingSkipQueueAttr.toLowerCase() === 'true') || false; | ||
const skipQueue = oTrackingSkipQueueAttr && oTrackingSkipQueueAttr.toLowerCase() === 'true' || false; | ||
const isInternal = href && href.indexOf(window.document.location.hostname) > -1; | ||
@@ -25,0 +25,0 @@ |
@@ -29,3 +29,3 @@ /** | ||
const safeCounter = () => { | ||
c = (c < discreteValues) ? c : 0; | ||
c = c < discreteValues ? c : 0; | ||
c++; // this is not subliminal | ||
@@ -44,3 +44,3 @@ return c - 1; | ||
// that the uid was created. | ||
const timestamp = (new Date().getTime()).toString(base); | ||
const timestamp = new Date().getTime().toString(base); | ||
@@ -60,3 +60,3 @@ // Prevent same-machine collisions. | ||
return (letter + timestamp + counter + fingerprint + random); | ||
return letter + timestamp + counter + fingerprint + random; | ||
}; | ||
@@ -84,3 +84,3 @@ | ||
for (let i in window) { // eslint-disable-line no-unused-vars, guard-for-in | ||
for (const i in window) { // eslint-disable-line no-unused-vars, guard-for-in | ||
count++; | ||
@@ -87,0 +87,0 @@ } |
126849
41
3854
3