File tree Expand file tree Collapse file tree
extension/writing-process/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 0.1.0+2025.10.14T13.37.19.878Z.ec3193cb .master
1+ 0.1.0+2025.10.15T14.41.46.897Z.c3469ce8 .master
Original file line number Diff line number Diff line change 22Background script. This works across all of Google Chrome.
33*/
44
5- // Do not save debug requests. We flip this frequently. Perhaps this
6- // should be a cookie or browser.storage?
7- var RAW_DEBUG = false ;
8-
9- /* This variable must be manually updated to specify the server that
10- * the data will be sent to.
11- */
12- var WEBSOCKET_SERVER_URL = "wss://learning-observer.org/wsapi/in/" ;
13-
5+ import { CONFIG } from "./service_worker_config.js" ;
146import { googledocs_id_from_url } from './writing_common' ;
157
168import * as loEvent from 'lo_event/lo_event/lo_event.js' ;
@@ -21,6 +13,8 @@ import { browserInfo } from 'lo_event/lo_event/metadata/browserinfo.js';
2113import { chromeAuth } from 'lo_event/lo_event/metadata/chromeauth.js' ;
2214import { localStorageInfo , sessionStorageInfo } from 'lo_event/lo_event/metadata/storage.js' ;
2315
16+ const { RAW_DEBUG , WEBSOCKET_SERVER_URL } = CONFIG ;
17+
2418// We would like to support fetching the websocket server from storage
2519
2620// callback = new Promise((resolve, reject) => {
@@ -35,7 +29,6 @@ let loEventActive = false;
3529let loggers = [ ] ;
3630const manifestVersion = chrome . runtime . getManifest ( ) . version ;
3731
38-
3932// We are not sure if this should be done within `websocketLogger()`'s `init`
4033// or one level up.
4134function startLogger ( ) {
Original file line number Diff line number Diff line change 1+ // service_worker_config.js
2+ export const CONFIG = {
3+ // Flag for logging `raw_http_request` events
4+ RAW_DEBUG : false ,
5+ // Learning Observer websocket connection endpoint
6+ WEBSOCKET_SERVER_URL : "wss://learning-observer.org/wsapi/in/" ,
7+ } ;
You can’t perform that action at this time.
0 commit comments