38 | 39 | 40 |
Config
42 |251 | 252 | 253 | 254 |
├── .prettierignore ├── sample.html ├── public ├── images │ ├── icon-128.png │ ├── icon-48.png │ ├── reload-128.png │ └── release-note-128.png ├── test-fullstop.html ├── test-SentenceSegregation.html ├── test-FirstCharRect.html ├── release-note.html ├── popup.css ├── test-scroll.html └── popup.html ├── .prettierrc ├── src ├── config │ ├── ColorConfigItem.ts │ ├── DropdownConfigItem.ts │ ├── ConfigManager.ts │ ├── NumberConfigItem.ts │ └── Config.ts ├── releaseNote.ts ├── FocusInfo.ts ├── Fragment.ts ├── Point.ts ├── draw │ ├── Drawer.ts │ ├── DrawStrategy.enum.ts │ ├── DrawOption.ts │ ├── UnderlineDrawer.ts │ ├── FirstCharOutlineDrawer.ts │ ├── FirstCharHighlighterDrawer.ts │ ├── FixedUnderlineDrawer.ts │ ├── OutlineDrawer.ts │ ├── HighlighterDrawer.ts │ ├── SpotlightDrawer.ts │ ├── BracketDrawer.ts │ └── MergedOutlineDrawer.ts ├── DelimitPattern.ts ├── AnchorDrawInfo.ts ├── SimpleDelimitPattern.ts ├── background.ts ├── Utils.ts ├── Stack.ts ├── Anchor.ts ├── Rect.ts ├── debug.ts ├── Renderer.ts ├── content.ts ├── main.ts └── FocusManager.ts ├── tsconfig.json ├── .gitignore ├── manifest.json ├── package.json ├── webpack.config.js ├── README.md └── LICENSE /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | build 4 | coverage 5 | -------------------------------------------------------------------------------- /sample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |a. b
5 | 6 | 7 | -------------------------------------------------------------------------------- /public/images/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamsteak1488/focus-anchor/HEAD/public/images/icon-128.png -------------------------------------------------------------------------------- /public/images/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamsteak1488/focus-anchor/HEAD/public/images/icon-48.png -------------------------------------------------------------------------------- /public/images/reload-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamsteak1488/focus-anchor/HEAD/public/images/reload-128.png -------------------------------------------------------------------------------- /public/images/release-note-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamsteak1488/focus-anchor/HEAD/public/images/release-note-128.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": true, 4 | "tabWidth": 2, 5 | "trailingComma": "all", 6 | "printWidth": 100, 7 | "endOfLine": "lf" 8 | } 9 | -------------------------------------------------------------------------------- /public/test-fullstop.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |1. one. 2. t2w2o. 3. three3. 4f. four. 55. fifty five. end
5 | 6 | 7 | -------------------------------------------------------------------------------- /src/config/ColorConfigItem.ts: -------------------------------------------------------------------------------- 1 | export class ColorConfigItem { 2 | selected: string; 3 | 4 | constructor(selected: string) { 5 | this.selected = selected; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/releaseNote.ts: -------------------------------------------------------------------------------- 1 | export async function getReleaseNoteHtml(): Promise5 | 데이터베이스를 어디까지 알아야하나요?? 6 | 데이터베이스를 어떻게 활용하는 것이 효율적인가요? 쿼리를 어떻게 만들고 8 | 튜닝해야할까요? 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/DelimitPattern.ts: -------------------------------------------------------------------------------- 1 | export class DelimitPattern { 2 | test: (str: string) => boolean; 3 | exclusionCountFromEnd: number; 4 | 5 | constructor(test: (str: string) => boolean, exclusionCountFromEnd: number) { 6 | this.test = test; 7 | this.exclusionCountFromEnd = exclusionCountFromEnd; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/AnchorDrawInfo.ts: -------------------------------------------------------------------------------- 1 | import { Rect } from './Rect'; 2 | 3 | export class AnchorDrawInfo { 4 | sentenceRects: Rect[]; 5 | firstCharRect: Rect | null; 6 | 7 | constructor(sentenceRects: Rect[], firstCharRect: Rect | null) { 8 | this.sentenceRects = sentenceRects; 9 | this.firstCharRect = firstCharRect; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/config/ConfigManager.ts: -------------------------------------------------------------------------------- 1 | import { Config } from './Config'; 2 | 3 | export class ConfigManager { 4 | private static instance: Config; 5 | 6 | private constructor() {} 7 | 8 | static getInstance(): Config { 9 | if (!ConfigManager.instance) { 10 | ConfigManager.instance = new Config(); 11 | } 12 | return ConfigManager.instance; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "lib": ["DOM", "ES2020"], 5 | "module": "CommonJS", 6 | "moduleResolution": "Node", 7 | "strict": true, 8 | "esModuleInterop": true, 9 | "skipLibCheck": true, 10 | "outDir": "dist", 11 | "types": ["chrome", "node", "jsdom"] 12 | }, 13 | "include": ["src/**/*"] 14 | } 15 | -------------------------------------------------------------------------------- /src/SimpleDelimitPattern.ts: -------------------------------------------------------------------------------- 1 | import { DelimitPattern } from './DelimitPattern'; 2 | 3 | export class SimpleDelimitPattern extends DelimitPattern { 4 | regexp: RegExp; 5 | 6 | constructor(regexp: RegExp, exclusionCountFromEnd: number) { 7 | super((str: string) => { 8 | return regexp.test(str); 9 | }, exclusionCountFromEnd); 10 | this.regexp = regexp; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/draw/DrawStrategy.enum.ts: -------------------------------------------------------------------------------- 1 | export enum DrawStrategy { 2 | Underline = 'Underline', 3 | FixedUnderline = 'FixedUnderline', 4 | Outline = 'Outline', 5 | MergedOutline = 'MergedOutline', 6 | Spotlight = 'Spotlight', 7 | FirstCharOutline = 'FirstCharOutline', 8 | Highlighter = 'Highlighter', 9 | FirstCharHighlighter = 'FirstCharHighlighter', 10 | Bracket = 'Bracket', 11 | } 12 | -------------------------------------------------------------------------------- /public/test-FirstCharRect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 이 과정에서 JVM이 이해할 수 있는 바이트 코드로 변환되어
6 | .class 파일이 생성됩니다. 이후부터는 JVM이 담당하는데요. 먼저
7 | 클래스 로더(Class Loader) 가 바이트 코드를 JVM 메모리에 동적으로 로드합니다.
8 | 로드된 바이트 코드는 Method Area에 저장되며, 이때 로딩(Loading), 링킹(Linking),
9 | 초기화(Initialization) 단계를 거칩니다.
10 |
6 | 7 | [GitHub Release Note] 8 | 9 |
10 |
15 |
16 |
18 |
19 |
27 | 28 | [GitHub Release Note] 29 | 30 |
31 |39 | 40 | [GitHub Release Note] 41 | 42 |
43 |
47 |
48 |
50 |
51 |
57 | Before
58 |
59 |
61 | After
62 |
63 |