Jyyjy commented on code in PR #457:
URL: https://github.com/apache/flagon-useralejs/pull/457#discussion_r1617611458


##########
package.json:
##########
@@ -2,13 +2,16 @@
   "name": "flagon-userale",
   "version": "2.4.0",
   "description": "UserALE.js is the UserALE client for DOM and 
JavaScript-based applications. It automatically attaches event handlers to log 
every user interaction on a web page, including rich JS single-page apps.",

Review Comment:
   Let's drop the js from userale.js wherever we can. Most importantly the repo 
name (after this is merged).



##########
package-lock.json:
##########


Review Comment:
   This lock file doesn't work on MacOS for myself or @rc10house. If we can't 
get a lock file that works for everyone, maybe it should be ignored?



##########
src/UserALEWebExtension/background.ts:
##########
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import * as MessageTypes from "@/UserALEWebExtension/messageTypes";
+import * as userale from "@/main";
+import { browser } from "@/UserALEWebExtension/globals";
+import { Extension, Logging } from "@/types";
+
+// Initalize userale plugin options
+const defaultConfig = {
+  useraleConfig: {
+    url: "http://localhost:8000";,
+    userId: "pluginUser",
+    authHeader: null,
+    toolName: "useralePlugin",
+    version: userale.version,
+  },
+  pluginConfig: {
+    // Default to a regex that will match no string
+    urlWhitelist: "(?!x)x",
+  },
+};
+
+let urlWhitelist: RegExp;
+const tabToHttpSession: { [id: string]: any } = {};
+let browserSessionId: string | null = null;
+
+/**
+ * Add log to UserALE buffer for sending to backend
+ * @param {any} message The message to send
+ * @return {void}
+ */
+function addLog(message: any) {
+  let log = message.payload;
+  log.browserSessionId = browserSessionId;

Review Comment:
   browserSessionId is null now. I'm looking into why.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org
For additional commands, e-mail: notifications-h...@flagon.apache.org

Reply via email to