MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / removeTextElements

Function removeTextElements

chrome-extension/src/content.js:78–83  ·  view source on GitHub ↗

* Finds and removes all of the text predictions added by this extension, and * removes them from the DOM. Note: This does not undo the containerization. A * cleaner implementation would move the image node back out of the container * div.

()

Source from the content-addressed store, hash-verified

76 * div.
77 */
78function removeTextElements() {
79 const textDivs = document.getElementsByClassName(TEXT_DIV_CLASSNAME);
80 for (const div of textDivs) {
81 div.parentNode.removeChild(div);
82 }
83}
84
85
86

Callers 1

clickHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected