5

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:

0

2 Answers 2

2
+125

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.

Sign up to request clarification or add additional context in comments.

Comments

-1

You can open a new link to your own site with an iframe of your targeted site and change the title of your own site.

example normal html:

<html>
<head>
    <title>The title of your page</title>
</head>
<body>
<iframe src="http://wibx950.com/"></iframe>
</body>

1 Comment

Much less efficient than just setting document.title.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.