最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome Extension - show dynamic text on mouse hover over extension icon - Stack Overflow

programmeradmin6浏览0评论

I've recently built a popup chrome extension(Popup Notes) It basically takes notes of whatever you type in popup.

Now I want to show saved notes whenever I hover my mouse over the extension icon. Right now it shows the static default title on mouse hover.

I know it's possible because this extension Checker Plus for Gmail shows the unread emails content on mouse hover and I'm not able to figure out how.

See Image:

So, How Can I show popup content on hovering mouse over icon in chrome extension?

Let me know if any further details are required.

I've recently built a popup chrome extension(Popup Notes) It basically takes notes of whatever you type in popup.

Now I want to show saved notes whenever I hover my mouse over the extension icon. Right now it shows the static default title on mouse hover.

I know it's possible because this extension Checker Plus for Gmail shows the unread emails content on mouse hover and I'm not able to figure out how.

See Image:

So, How Can I show popup content on hovering mouse over icon in chrome extension?

Let me know if any further details are required.

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Nov 30, 2016 at 6:33 GorvGoylGorvGoyl 49.9k37 gold badges261 silver badges264 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

For manifest V2 or earlier: chrome.browserAction.setTitle

For Manifest V3: Use chrome.action.setTitle

The tooltip which is shown on hover for your browserAction button is the title. You can change the title using chrome.browserAction.setTitle().

For example:

chrome.browserAction.setTitle({
    title:'This is the tooltip text upon mouse hover.'
});

browserAction.setTitle() can also take an optional tabId which will change the title only for the specified tab.

Here is a GIF of a browserAction button switching between two different titles:

发布评论

评论列表(0)

  1. 暂无评论