brett,
this is interesting thanks. felt you should know that your demo no longer wonders though, appears you aren't properly handling http/https differences, as any url now gives no results in demo.
here is the errors in chrome console for demo:
Mixed Content: The page at 'https://brettterpstra.com/share/word-repetition-check.php' was loaded over HTTPS, but requested an insecure script 'http://www.google.com/jsapi'. This request has been blocked; the content must be served over HTTPS. word-repetition-check.php:101 Uncaught ReferenceError: google is not defined at word-repetition-check.php:101 word-repetition-check.php:366 Uncaught ReferenceError: jQuery is not defined at word-repetition-check.php:366
best
Fixed, thanks for the heads up!
hm, now it says the word: 'Source' but still no results.
obv just a demo so maybe you don't mind but fwiw
tried these urls, no results and no errors :
https://politico.com https://fivethirtyeight.com
this one:
https://en.wikipedia.org/wiki/JavaScript
showed 'source' and then the content of page, but showed error in console:
Uncaught SyntaxError: Unexpected identifier at eval (<anonymous>) at jquery.min.js:2 at Function.globalEval (jquery.min.js:2) at Ha (jquery.min.js:3) at n.fn.init.append (jquery.min.js:3) at HTMLParagraphElement.<anonymous> (word-repetition-check.php:350) at Function.each (jquery.min.js:2) at Object.success (word-repetition-check.php:348) at i (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2)
please ignore/delete if not helpful.