https://github.com/prettydiff/semantictext
Copy paste tool that analyzes the semantic description of all text in the DOM
https://github.com/prettydiff/semantictext
Last synced: 10 months ago
JSON representation
Copy paste tool that analyzes the semantic description of all text in the DOM
- Host: GitHub
- URL: https://github.com/prettydiff/semantictext
- Owner: prettydiff
- License: mit
- Created: 2015-06-22T11:06:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T16:22:17.000Z (over 4 years ago)
- Last Synced: 2025-03-27T08:48:23.768Z (11 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 28
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
semanticText
===
How to run
---
Copy the contents of semanticText.js and paste into a browser console. Run the
code.
What it does
---
Finds all text nodes that are not purely white space and evaluates them against
their parent node's node name. In the case where a parent node is a span, the
span's parent node is evaluated. If that node is a span, its parent node is
evaluated.
* A first list provides text content that is poorly described by its HTML parent node.
* A second list provides text content that is well described by an inline element but poorly described there after.
* A third list provides all text content in the order in which it occurs in the DOM so that text can read according to its order in the code.
Dependency
---
This tool uses and includes [getNodesByType](https://github.com/prettydiff/getNodesByType) to walk the DOM
License
---
MIT License