This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch setupStartStopRefactor
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git
The following commit(s) were added to refs/heads/setupStartStopRefactor by this
push:
new 40eea40 mod to setup()
40eea40 is described below
commit 40eea40f4106e47e6739c4f0dd5bdf17429829e1
Author: poorejc <[email protected]>
AuthorDate: Sat Mar 26 23:36:10 2022 -0400
mod to setup()
---
build/UserALEWebExtension/content.js | 17 +++--------------
build/userale-2.2.0.js | 6 +++---
build/userale-2.2.0.min.js | 2 +-
src/main.js | 6 +++---
4 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/build/UserALEWebExtension/content.js
b/build/UserALEWebExtension/content.js
index ac2a1c0..200621c 100644
--- a/build/UserALEWebExtension/content.js
+++ b/build/UserALEWebExtension/content.js
@@ -1044,31 +1044,20 @@ function setup(config) {
if (config.autostart && (state === 'interactive' || state ===
'complete')) {
attachHandlers(config);
- start();
+ initSender(logs, config);
+ started = config.on = true;
packageCustomLog({
type: 'load',
logType: 'raw',
pageLoadTime: endLoadTimestamp - startLoadTimestamp
}, function () {}, false);
} else {
- attachHandlers(config);
+ setup(config);
}
}, 100);
}
} // Export the Userale API
/**
- * Used to start the logging process if the
- * autostart configuration option is set to false.
- */
-
-function start() {
- if (!started) {
- initSender(logs, config);
- started = config.on = true;
- config.autostart = true;
- }
-}
-/**
* Updates the current configuration
* object with the provided values.
* @param {Object} newConfig The configuration options to use.
diff --git a/build/userale-2.2.0.js b/build/userale-2.2.0.js
index 1eea6e0..9a56442 100644
--- a/build/userale-2.2.0.js
+++ b/build/userale-2.2.0.js
@@ -1105,14 +1105,15 @@
if (config.autostart && (state === 'interactive' || state ===
'complete')) {
attachHandlers(config);
- start();
+ initSender(logs, config);
+ exports.started = config.on = true;
packageCustomLog({
type: 'load',
logType: 'raw',
pageLoadTime: endLoadTimestamp - startLoadTimestamp
}, function () {}, false);
} else {
- attachHandlers(config);
+ setup(config);
}
}, 100);
}
@@ -1127,7 +1128,6 @@
function start() {
if (!exports.started) {
- initSender(logs, config);
exports.started = config.on = true;
config.autostart = true;
}
diff --git a/build/userale-2.2.0.min.js b/build/userale-2.2.0.min.js
index 155bc73..0f2d7fd 100644
--- a/build/userale-2.2.0.min.js
+++ b/build/userale-2.2.0.min.js
@@ -16,4 +16,4 @@
* @preserved
*/
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof
module?t(exports):"function"==typeof
define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof
globalThis?globalThis:e||self).userale={})}(this,(function(e){"use
strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof
Symbol.iterator?function(e){return typeof e}:function(e){return
e&&"function"==typeof
Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof
e},t(e)}var n="2.2.0",o=null;fu [...]
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof
module?t(exports):"function"==typeof
define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof
globalThis?globalThis:e||self).userale={})}(this,(function(e){"use
strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof
Symbol.iterator?function(e){return typeof e}:function(e){return
e&&"function"==typeof
Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof
e},t(e)}var n="2.2.0",o=null;fu [...]
diff --git a/src/main.js b/src/main.js
index d0ec10c..da19412 100644
--- a/src/main.js
+++ b/src/main.js
@@ -65,14 +65,15 @@ function setup(config) {
if (config.autostart && (state === 'interactive' || state ===
'complete')) {
attachHandlers(config);
- start();
+ initSender(logs, config);
+ started = config.on = true;
packageCustomLog({
type: 'load',
logType: 'raw',
pageLoadTime: endLoadTimestamp - startLoadTimestamp
}, () => {},false)
} else {
- attachHandlers(config);
+ setup(config);
}
}, 100);
}
@@ -88,7 +89,6 @@ export const version = userAleVersion;
*/
export function start() {
if (!started) {
- initSender(logs, config);
started = config.on = true;
config.autostart = true;
}