Ocene za Rename Tab Title
Rename Tab Title — Anush Veeranala
Ocena uporabnika Uporabnik Firefoxa 10122440
Ocenjeno z 4 od 5
— Uporabnik Firefoxa 10122440, pred 6 letiHey, I might've found a solution for dynamically updated titles. The following code listens for changes of the 'document.title' object and allows you to execute code when it changes. I would send a PR, but it doesn't seem that you're on any public VCS platform.
new MutationObserver(function(mutations) {
console.log(mutations);
// overwrite the title here
}).observe(
document.querySelector('title'),
{
subtree: true,
characterData: true,
childList: true
}
);
new MutationObserver(function(mutations) {
console.log(mutations);
// overwrite the title here
}).observe(
document.querySelector('title'),
{
subtree: true,
characterData: true,
childList: true
}
);