File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11import { CONFIG } from '../lib/config'
22import { logger } from '../lib/logger'
33import { EnhancerRegistry , TextareaRegistry } from '../lib/registries'
4+ import { githubPrNewCommentContentScript } from '../playgrounds/github-playground'
45
56const enhancers = new EnhancerRegistry ( )
67const enhancedTextareas = new TextareaRegistry ( )
78
89export default defineContentScript ( {
910 main ( ) {
11+ if ( CONFIG . MODE === 'PLAYGROUNDS_PR' ) {
12+ githubPrNewCommentContentScript ( )
13+ return
14+ }
1015 const textAreasOnPageLoad = document . querySelectorAll < HTMLTextAreaElement > ( `textarea` )
1116 for ( const textarea of textAreasOnPageLoad ) {
1217 enhanceMaybe ( textarea )
Original file line number Diff line number Diff line change 1- // Configuration constants for the extension
1+ const MODES = [ 'PROD' , 'PLAYGROUNDS_PR' ] as const
2+
3+ export type ModeType = ( typeof MODES ) [ number ]
4+
25export const CONFIG = {
36 ADDED_OVERTYPE_CLASS : 'gitcasso-overtype' ,
4- // Debug settings
5- DEBUG : true , // Set to true to enable debug logging
6- EXTENSION_NAME : 'gitcasso' ,
7- INITIAL_SCAN_DELAY_MS : 100 ,
8- MUTATION_OBSERVER_DELAY_MS : 100 ,
7+ DEBUG : true , // enabled debug logging
8+ EXTENSION_NAME : 'gitcasso' , // decorates logs
9+ MODE : 'PLAYGROUNDS_PR' satisfies ModeType ,
910} as const
You can’t perform that action at this time.
0 commit comments