I've looked at other posts talking about using document.title to rename the title of a tab but I can't seem to get it to work.
I'm using a background script to send a message to the content script.
background.js
/* gets current tab */
chrome.tabs.query({ active: true, currentWindow: true }, function (tab)
{
var promptUser = prompt("Rename tab:");
chrome.tabs.sendMessage(tabs[0].id, {title: promptUser}, function(response) {});
});
content.js
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse)
{
/* custom title */
if (request.title)
{
document.title = request.title;
}
})