Skip to content

Commit 728dbc0

Browse files
author
ntwigg
committed
Rename.
1 parent 0805bda commit 728dbc0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

browser-extension/src/datamodel/registries.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { RedditHandler as RedditEnhancer } from './handlers/reddit-handler'
55

66
export interface EnhancedTextarea<T extends CommentSpot = CommentSpot> {
77
element: HTMLTextAreaElement
8-
context: T
8+
spot: T
99
handler: CommentEnhancer<T>
1010
overtype: OverType
1111
}
@@ -37,8 +37,8 @@ export class EnhancerRegistry {
3737
try {
3838
const result = handler.tryToEnhance(textarea)
3939
if (result) {
40-
const [overtype, context] = result
41-
return { context, element: textarea, handler, overtype }
40+
const [overtype, spot] = result
41+
return { element: textarea, handler, overtype, spot }
4242
}
4343
} catch (error) {
4444
console.warn('Handler failed to identify textarea:', error)

browser-extension/src/entrypoints/content.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ function enhanceMaybe(textarea: HTMLTextAreaElement) {
7777
if (enhancedTextarea) {
7878
logger.debug(
7979
'Identified textarea:',
80-
enhancedTextarea.context.type,
81-
enhancedTextarea.context.unique_key,
80+
enhancedTextarea.spot.type,
81+
enhancedTextarea.spot.unique_key,
8282
)
8383
enhancedTextareas.register(enhancedTextarea)
8484
} else {

0 commit comments

Comments
 (0)