Is there a name for this technique, which is to open a page open in a browser, to find specific content and change it?
Some examples:
I understand that this is a kind of progressive perfection. But I am particularly interested in the first step - the process of detecting content. I would be interested in articles that offer best practices, or explain the flaws of this technique.
Edit: I added an example to show that this method is not only for text nodes, but can be applied to any type of html content.
For example, execute this code for this web page (from the console) and all numbers on the page will be replaced with "X":
function walkTheDOM( node, func ) { func( node ); node = node.firstChild; while ( node ) { walkTheDOM( node, func ); node = node.nextSibling; } } walkTheDOM( document.body, function ( node ) { if ( node.nodeType === 3 ) { node.data = node.data.replace( /\d/g, 'X' ); } });
This functionality is called add-ons , and the technique they use is to move the DOM
, , - , , , ββ . .. , Skype
( PNR, Skype Phone Number Recognition), , , - DOM.
, , , , , ajax, .
, javascript-, : Firefox html.
GreaseMonkey jQuery.
, , .
, -. , , - Yioop!
, , "- //". :
-