This JS can be pasted onto a browser's console. (I tested this version of the code on Chrome browser console using this URL: https://en.wikipedia.org/wiki/Programming_language)
It will replace words inside a specified div with their number of occurences. It will ignore the 100 most common english words, along with "are", "is", "where", "was".
The following variables' values can be replaced according to the user's needs:
- div -> div that will be scanned and have words replaced (ex. #content)
- top -> number of words that will be replaced (ex. 25, this will replace the 25 most common words in the div)