Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
WIP - Add hover effect. Closes #9. #12
Conversation
biancadanforth
changed the title from
Add hover effect. Closes #9.
to
WIP - Add hover effect. Closes #9.
Dec 7, 2017
|
I think the multiple wrap problem will go away with the tree walker implementation. |
|
I will make the treeWalker a different commit. |
gregglind
merged commit 526535e
into
mozilla:master
Dec 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
biancadanforth commentedDec 7, 2017
•
Edited 5 times
-
biancadanforth
Dec 7, 2017
-
biancadanforth
Dec 7, 2017
-
biancadanforth
Dec 7, 2017
-
biancadanforth
Dec 7, 2017
-
biancadanforth
Dec 7, 2017
I discovered why we were seeing multiple "span" elements wrapped around the same matching word -- we were looking for "div" and "p" elements to check, and frequently, a "div" would have nested "div"s and "p"s, so if a word was in one of the nested elements, it'd get wrapped multiple times. I have changed the
querySelectorAllto look for "p", "h1", "h2" and "h3" now, which are not commonly nested within each other. A quick check on the Mozilla privacy page showed they are never nested within each other for that page.Loose ends: