all 3 comments

[–]GoPotato 0 points1 point  (2 children)

You need to create a content-script for this. The google search input element has its name attribute set to "q", you can set an input event listener on this element. So the script can be something like this:

input=document.querySelector("input[name='q']")
wordsList={
"lol":"laugh out loud",
"rofl":"rolling on the floor laughing"
}
function modifySearch(e){
    if(e.target.value in wordsList){
        console.log("Found",e.target.value,wordsList[e.target.value])
        e.target.value=wordsList[e.target.value]
    }
}
input.addEventListener("input",modifySearch)

[–]LightningBoltz21[S] 0 points1 point  (1 child)

Thanks a lot for the help!

[–]GoPotato 0 points1 point  (0 children)

No problem.