I wrote a script that works on Greasemonkey extension to insert a link to a certain site. The problem is that it works only on the first page of that site. I need a script (Javascript only) that triggers a function when the URL is changed.
I find something related to location.hash but unfortunatelly it doesn't work for me.
var last_hash = "";
setInterval(function() {
hash = window.location.hash;
if(last_hash != hash && hash.length != 1) {
processing();
}
last_hash = window.location.hash;
}, 250);
Any ideas?