browser-assistant 2.9.17 → 2.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ function mountJournalCountdown(signal) {
12
12
  function getCountdownLabel() {
13
13
  const now = Date.now();
14
14
  const path = location.pathname.replace(/\/$/, '');
15
- const aurora = location.origin === 'https://sidus.net';
15
+ const aurora = location.origin === 'https://sidus.net' || location.origin === 'https://www.sidus.net';
16
16
  const visible = timers.filter(timer => timer.deadline > now
17
17
  && (!aurora || (path.startsWith('/modules/reflective-journal/') && timer.path !== path)));
18
18
  if (!visible.length)
@@ -1,6 +1,9 @@
1
1
  function formatJournalTime(seconds) {
2
2
  return `${String(Math.floor(seconds / 60)).padStart(2, '0')}:${String(seconds % 60).padStart(2, '0')}`;
3
3
  }
4
+ function isSidusJournalOrigin(origin) {
5
+ return origin === 'https://sidus.net' || origin === 'https://www.sidus.net';
6
+ }
4
7
  function browserAssistantJournal(global) {
5
8
  'use strict';
6
9
  const keys = ['experience', 'feelings', 'learning', 'application', 'conclusion'];
@@ -111,7 +114,7 @@ function browserAssistantJournal(global) {
111
114
  const api = { validate, metadata, fields, pageText, readField, writeField, remainingSeconds };
112
115
  if (typeof module !== 'undefined')
113
116
  module.exports = api;
114
- if (!global.document || global.location?.origin !== 'https://sidus.net')
117
+ if (!global.document || !isSidusJournalOrigin(global.location?.origin))
115
118
  return;
116
119
  if (!/^\/modules\/reflective-journal\//.test(global.location.pathname))
117
120
  return;
@@ -590,7 +593,7 @@ function browserAssistantJournal(global) {
590
593
  document.removeEventListener('keydown', shortcutListener, true);
591
594
  }
592
595
  }
593
- if (typeof window !== 'undefined' && location.origin === 'https://sidus.net') {
596
+ if (typeof window !== 'undefined' && isSidusJournalOrigin(location.origin)) {
594
597
  const ongoingJournalStartLink = () => {
595
598
  const links = [...document.querySelectorAll('a[href*="/modules/reflective-journal/"]')].filter(link => [...(link.closest('tr,[role="row"]')?.querySelectorAll('*') || [])].some(node => /^Ongoing$/i.test(node.textContent.trim())) && link.getClientRects().length
596
599
  && new URL(link.href, location.origin).origin === location.origin
@@ -645,7 +648,7 @@ if (typeof window !== 'undefined' && location.origin === 'https://sidus.net') {
645
648
  }
646
649
  }
647
650
  browserAssistantJournal(typeof window === 'undefined' ? globalThis : window);
648
- if (typeof window !== 'undefined' && location.origin === 'https://sidus.net' && !window.BrowserAssistantJournalBoot) {
651
+ if (typeof window !== 'undefined' && isSidusJournalOrigin(location.origin) && !window.BrowserAssistantJournalBoot) {
649
652
  window.BrowserAssistantJournalBoot = true;
650
653
  let lastDeadline;
651
654
  const storage = window.chrome?.storage?.local;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Browser Assistant",
4
- "version": "2.9.17",
4
+ "version": "2.9.18",
5
5
  "description": "Scans webpages for MCQs and coding problems. Powered by Groq (cloud) and Ollama (local fallback).",
6
6
  "permissions": [
7
7
  "activeTab",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-assistant",
3
- "version": "2.9.17",
3
+ "version": "2.9.18",
4
4
  "description": "Chrome extension and local Python backend for exploring webpage questions and coding exercises",
5
5
  "license": "MIT",
6
6
  "repository": {
package/server/main.py CHANGED
@@ -192,7 +192,7 @@ async def lifespan(_app: FastAPI):
192
192
  client.close()
193
193
 
194
194
 
195
- app = FastAPI(title="Browser Assistant API", version="2.9.17", lifespan=lifespan)
195
+ app = FastAPI(title="Browser Assistant API", version="2.9.18", lifespan=lifespan)
196
196
  install_local_guards(app)
197
197
 
198
198
  @app.exception_handler(HTTPException)