for (const element of document.getElementsByTagName("p")) {
let a = document.createElement("a");
a.innerText = element.innerText;
a.setAttribute("href", "https://www.google.com/search?q=" + element.innerText);
a.setAttribute("target", "_blank");
element.innerText = "";
element.appendChild(a);
}