Rewrite page title using Replace function

Rewrite page title using Replace function

Closed - This job posting has been filled.

Job Description

I have a form that outputs words separated by a Boolean operator ("and") in the page title. I need a little javascript that would get rid of all instances of "and" and replace them with something else For example:

"word1 and word2 and word3 and wordN" would be replaced with:

"word1 word2: word3, wordN"

In other words, the output expression will have a colon (:) right after word2, and the remaining words need to be separated by a comma (,).

The script needs to make an exception for "magnifier" search, which consists of a single word:

magnifier: word2, word3, wordN

PLEASE NOTE:

1) This script will be placed in the search results page to reflect the meta title, meta description, page title, and text description right below the page title. (No script installation required, only instructions.)

2) Script must perform the action before page loads, but must not interfere with the search results.

3) The script does not apply to the word "and" when used as a conjunction. For example: talking watches for the blind and visually impaired, memory loss and cognitive disorders. In this case, "add" must remain 'as is'.

THIS PROJECT DOES NOT REQUIRE SCRIPT INSTALLATION; THEREFORE, NO FTP ACCESS WILL BE PROVIDED.

Any questions, feel free to ask.