diff --git a/src/ContentScript/index.js b/src/ContentScript/index.js index 99e39f5..817b290 100644 --- a/src/ContentScript/index.js +++ b/src/ContentScript/index.js @@ -1,3 +1,6 @@ +import Logger from '../Logger'; +import NodeObserver from './observer'; + const runTimeHandler = typeof browser === 'undefined' ? chrome : browser; const FIXATION_BREAK_RATIO = 0.33; @@ -6,7 +9,10 @@ const DEFAULT_SACCADES_INTERVAL = 0; const DEFAULT_FIXATION_STRENGTH = 3; // which tag's content should be ignored from bolded -const IGNORE_NODE_TAGS = ['STYLE', 'SCRIPT']; +const IGNORE_NODE_TAGS = ['STYLE', 'SCRIPT', 'BR-SPAN', 'BR-FIXATION', 'BR-BOLD']; + +/** @type {NodeObserver} */ +let observer; // making half of the letters in a word bold function highlightText(sentenceText) { @@ -40,7 +46,7 @@ function makeFixations(/** @type string */ textContent) { function parseNode(/** @type Element */ node) { // some websites add