Is there a way to use Tampermonkey to change the window title for a pop-up (child?) window? (This is for a streaming audio player)
Usually, we would use document.title
to change the browser page/tab title for a webpage, but in this case it doesn't work. I believe that is because it is a pop-up spawned by the main webpage.
Is there a way to accomplish this via Tampermonkey
.
This is the site with the pop-up I wish to modify. Click the "Listen Now" red button at top right and the pop-up will. I wish to change the title for that pop-up window.
References I tried/used:
For the kind of popup given in your question, changing the title is simplicity itself. Merely set the script to run on the URL of the popup and then use document.title
Here is a complete working script that operates on the "Listen Now" popup of that page:
// ==UserScript==
// @name _Change popup title
// @match *://wibx950.com/listen-live/popup/
// @grant none
// ==/UserScript==
document.title = "WKRP";
If you have a more intractable example, post a link/recipe to/for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With