@aller/blink-labrador
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -31,4 +31,3 @@ "use strict"; | ||
var uuid_1 = __importDefault(require("./utils/uuid")); | ||
var store_event_data_1 = __importDefault(require("./utils/store-event-data")); | ||
var prev_article_preview_1 = require("./utils/prev-article-preview"); | ||
var session_storage_1 = require("./utils/session-storage"); | ||
function getThreshold(element) { | ||
@@ -47,7 +46,4 @@ return element.offsetHeight * element.offsetWidth >= 242500 ? 0.3 : 0.5; | ||
this.blink = blink_1.default({ | ||
send: function (events) { | ||
// We want to store some data regarding article previews | ||
store_event_data_1.default(events); | ||
sender_1.default.sendWhenBefitting(events); | ||
}, | ||
send: function (events) { return sender_1.default.sendWhenBefitting(events); }, | ||
persistState: session_storage_1.setItemInSessionStorage, | ||
utils: { | ||
@@ -59,3 +55,3 @@ getScrollHeight: function () { return document.documentElement.scrollHeight; }, | ||
getArticleBodyHeight: function () { return 0; }, | ||
getPreviousArticlePreview: function (id) { return prev_article_preview_1.getArticlePreview(id); }, | ||
getPersistedState: session_storage_1.getItemFromSessionStorage, | ||
}, | ||
@@ -180,3 +176,3 @@ useDevTools: true, | ||
clearTimeout(this.activeTimeTimerId); | ||
this.activeTimeTimerId = window.setTimeout(function () { return _this.blink.articleActivityPause(url); }, 10000); | ||
this.activeTimeTimerId = window.setTimeout(function () { return _this.blink.articleActivityStop(url); }, 10000); | ||
}; | ||
@@ -197,3 +193,2 @@ LabradorTracker._getCurrentUrl = function () { | ||
}, 2000); | ||
var pause = function () { return _this.blink.articleActivityPause(url); }; | ||
var stop = function () { return _this.blink.articleActivityStop(url); }; | ||
@@ -204,3 +199,3 @@ mousedown_1.default(throttledStart); | ||
mousemove_1.default(throttledStart); | ||
visibilitychange_1.default(pause); | ||
visibilitychange_1.default(stop); | ||
click_on_outgoing_link_1.default(stop); | ||
@@ -207,0 +202,0 @@ unload_1.default(stop); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function startsWith(fullString, searchString) { | ||
return fullString.indexOf(searchString) === 0; | ||
return fullString && fullString.indexOf(searchString) === 0; | ||
} | ||
@@ -6,0 +6,0 @@ function getFullUrl(href, location) { |
{ | ||
"name": "@aller/blink-labrador", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "Library for using blink on Labrador", | ||
@@ -70,3 +70,3 @@ "main": "lib/main.js", | ||
"dependencies": { | ||
"@aller/blink": "^3.2.2", | ||
"@aller/blink": "^4.0.0", | ||
"@soldotno/aller-in-view": "^3.0.2" | ||
@@ -73,0 +73,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240406
140
3049
286
2
5
44
+ Added@aller/blink@4.4.5(transitive)
+ Added@aller/external-id@4.3.2(transitive)
+ Addedmd5@2.3.0(transitive)
+ Addedtlds@1.209.0(transitive)
- Removed@aller/blink@3.3.1(transitive)
- Removed@aller/external-id@4.0.8(transitive)
- Removedmd5@2.2.1(transitive)
Updated@aller/blink@^4.0.0