Skip to content

Commit a0954a2

Browse files
committed
refactor(timeline): update historical naming
1 parent 491b353 commit a0954a2

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

public/contentStyle.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ChatGPT-like timeline styling with CSS variables and theme awareness */
1+
/* Gemini-like timeline styling with CSS variables and theme awareness */
22
:root {
33
--timeline-dot-color: #cbd5e1;
44
--timeline-dot-active-color: #3b82f6;
@@ -39,17 +39,17 @@
3939
}
4040
}
4141
/* Gemini theme hosts */
42-
.theme-host.dark-theme .chatgpt-timeline-bar:not(.timeline-no-container) {
42+
.theme-host.dark-theme .gemini-timeline-bar:not(.timeline-no-container) {
4343
background-color: rgba(2, 6, 23, 0.72);
4444
backdrop-filter: blur(4px);
4545
-webkit-backdrop-filter: blur(4px);
4646
}
47-
.theme-host.light-theme .chatgpt-timeline-bar:not(.timeline-no-container) {
47+
.theme-host.light-theme .gemini-timeline-bar:not(.timeline-no-container) {
4848
background-color: rgba(248, 250, 252, 0.85);
4949
backdrop-filter: blur(4px);
5050
-webkit-backdrop-filter: blur(4px);
5151
}
52-
.chatgpt-timeline-bar {
52+
.gemini-timeline-bar {
5353
position: fixed;
5454
top: 60px;
5555
right: 15px;
@@ -288,7 +288,7 @@ html.dark .timeline-left-slider::before {
288288
.timeline-runner-ring {
289289
will-change: top, opacity;
290290
}
291-
.chatgpt-timeline-bar.timeline-no-container {
291+
.gemini-timeline-bar.timeline-no-container {
292292
background-color: transparent !important;
293293
backdrop-filter: none !important;
294294
-webkit-backdrop-filter: none !important;

src/pages/content/timeline/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ function initializeTimeline(): void {
1919
timelineManagerInstance = null;
2020
}
2121
try {
22-
document.querySelector('.chatgpt-timeline-bar')?.remove();
22+
document.querySelector('.gemini-timeline-bar')?.remove();
2323
} catch {}
2424
try {
2525
document.querySelector('.timeline-left-slider')?.remove();
2626
} catch {}
2727
try {
28-
document.getElementById('chatgpt-timeline-tooltip')?.remove();
28+
document.getElementById('gemini-timeline-tooltip')?.remove();
2929
} catch {}
3030
timelineManagerInstance = new TimelineManager();
3131
timelineManagerInstance
@@ -45,13 +45,13 @@ function handleUrlChange(): void {
4545
timelineManagerInstance = null;
4646
}
4747
try {
48-
document.querySelector('.chatgpt-timeline-bar')?.remove();
48+
document.querySelector('.gemini-timeline-bar')?.remove();
4949
} catch {}
5050
try {
5151
document.querySelector('.timeline-left-slider')?.remove();
5252
} catch {}
5353
try {
54-
document.getElementById('chatgpt-timeline-tooltip')?.remove();
54+
document.getElementById('gemini-timeline-tooltip')?.remove();
5555
} catch {}
5656
}
5757
}

src/pages/content/timeline/manager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ export class TimelineManager {
285285
}
286286

287287
private injectTimelineUI(): void {
288-
let bar = document.querySelector('.chatgpt-timeline-bar') as HTMLElement | null;
288+
let bar = document.querySelector('.gemini-timeline-bar') as HTMLElement | null;
289289
if (!bar) {
290290
bar = document.createElement('div');
291-
bar.className = 'chatgpt-timeline-bar';
291+
bar.className = 'gemini-timeline-bar';
292292
document.body.appendChild(bar);
293293
}
294294
this.ui.timelineBar = bar;
@@ -322,7 +322,7 @@ export class TimelineManager {
322322
if (!this.ui.tooltip) {
323323
const tip = document.createElement('div');
324324
tip.className = 'timeline-tooltip';
325-
tip.id = 'chatgpt-timeline-tooltip';
325+
tip.id = 'gemini-timeline-tooltip';
326326
document.body.appendChild(tip);
327327
this.ui.tooltip = tip;
328328
if (!this.measureEl) {
@@ -765,7 +765,7 @@ export class TimelineManager {
765765

766766
this.onStorage = (e: StorageEvent) => {
767767
if (!e || e.storageArea !== localStorage) return;
768-
const expectedKey = `chatgptTimelineStars:${this.conversationId}`;
768+
const expectedKey = `geminiTimelineStars:${this.conversationId}`;
769769
if (e.key !== expectedKey) return;
770770
let nextArr: string[] = [];
771771
try {
@@ -1270,7 +1270,7 @@ export class TimelineManager {
12701270
dot.dataset.targetTurnId = marker.id;
12711271
dot.setAttribute('aria-label', marker.summary);
12721272
dot.setAttribute('tabindex', '0');
1273-
dot.setAttribute('aria-describedby', 'chatgpt-timeline-tooltip');
1273+
dot.setAttribute('aria-describedby', 'gemini-timeline-tooltip');
12741274
dot.style.setProperty('--n', String(marker.n || 0));
12751275
if (this.usePixelTop) dot.style.top = `${Math.round(this.yPositions[i])}px`;
12761276
dot.classList.toggle('active', marker.id === this.activeTurnId);
@@ -1408,7 +1408,7 @@ export class TimelineManager {
14081408
const cid = this.conversationId;
14091409
if (!cid) return;
14101410
try {
1411-
localStorage.setItem(`chatgptTimelineStars:${cid}`, JSON.stringify(Array.from(this.starred)));
1411+
localStorage.setItem(`geminiTimelineStars:${cid}`, JSON.stringify(Array.from(this.starred)));
14121412
} catch {}
14131413
}
14141414

@@ -1417,7 +1417,7 @@ export class TimelineManager {
14171417
const cid = this.conversationId;
14181418
if (!cid) return;
14191419
try {
1420-
const raw = localStorage.getItem(`chatgptTimelineStars:${cid}`);
1420+
const raw = localStorage.getItem(`geminiTimelineStars:${cid}`);
14211421
if (!raw) return;
14221422
const arr = JSON.parse(raw);
14231423
if (Array.isArray(arr)) arr.forEach((id: any) => this.starred.add(String(id)));

0 commit comments

Comments
 (0)