Is it possible to make document.title
(<head><title> .. </title></head>
) impossible to change for Javascript ?
My problem is that iny my project there are some javascripts that change document.title
every 1 second and I want title to stay the same. Unfortuantely I am not able to change or remove those JS files. I've tried a to think of workaround, something like that :
function checkTitle() {
if(document.title != oldTitle)
document.title = oldTitle;
}
setInterval(checkTitle(), 100);
It seems like a good idea, BUT unfortuantely there I have also counter which displays timer on my site. My whole code looks like this :
var ticks = 0;
function update() {
if(ticks % 1000 == 0) {
...update timer and some other stuff...
}
ticks+=100;
if(document.title != oldTitle)
document.title = oldTitle;
}
setInterval(update, 100);
Such code after +- 100 seconds is beggining to slow down and my timer definitely is not updated every 1 second.
So the question is : Is it possible to make html element (..) impossible to change for javascript, if not, is there any workaround for my problem ?
Thanks in advance.