The below is in my userscript. It doesnt do the alert because when i replace the html i am clobbering it somehow.How do i replace regular text in a div or span that is literally domain[dot]com so it will appear as domain.com? Well the below works but breaks code running after and other userscripts.\[code\]$(function() { var html = $('body').html(); var res=html.replace(/\[dot\]/g, "."); $('body').html(res); //doesnt call, however html is replaced alert('a'); });\[/code\]