I think you have an infinite loop here:
for(var j = i; i + myName.length; i = j++)
A for loop takes three pieces of information. The first is where to start the loop; the second, how long to continue the loop; and the third, how to adjust between loops.
So when you say
for(var i = 0; i < text.length;i++) you're telling the computer to start with the variable i at 0, looping as long as i is still less than text.length, and increasing i by one for each new loop. But when you say
for(var j = i; i + myName.length; i = j++) you're telling the computer to start with the variable j equal to... an undefined i, looping as long as (undefined plus a number), and with each new loop set i equal to j+1. So if this loop works at all, there's nothing to stop it from looping forever... which will crash the browser.