We are looking for a script in Javascript to show contextual advertising on the pages where the code is inserted.
Therefore, the code should do as following:
Get a maximum of 20 (or the amount defined in the script) keywords from the page where the code is being loaded, those keywords must be the ones mentioned more times in that order.
So the code must get all the unique words with the amount of repetitions for each one and then return the 20 (or the amount set in the script) with more repetitions.
Script must avoid words with 3 characters.
It must be super fast as it will be used in an ad network and we need to show ads as fast as possible.
ONLY SERIOUS PROGRAMMERS