JavaScript rewrite/replace text into href (link) on page
<p>I need simple JS code(pure JS,no frameworks) to rewrite piece of text into linked anchor(hyperlink) when visitor load page.</p>

<p>Or to be more precise, something same like many advertising services using:
- put JS on existing page
- when JS is fired it connect to my servers, find some data and
 rewrites certain phrases in page content into hyperlinks</p>

<p>For now I done part of job where fired JS contact my server, finding appropriate phrases which will convert to hyperlinks, but don't have idea how to rewrite phrase on page into hyperlink.</p>

<p>So, if any body have pure JS solution for this please share with me :) </p>
