如何用颜色突出显示浏览器选项卡 [英] How to highlight a browser tab with color

查看:211
本文介绍了如何用颜色突出显示浏览器选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个聊天Web应用程序,并且我需要一个功能,如果特定用户在浏览器窗口中打开了多个选项卡,并且如果聊天选项卡不是活动的选项卡,则如果他从另一端收到了ping,聊天标签应自动突出显示以吸引用户的注意力.

I have a chat web application and I need a feature wherein if a particular user has multiple tabs open in the browser window and if the chat tab isnt the active one, in case if he receives a ping from the other end, the chat tab should automatically highlight to grab the users attention.

我计划在jQuery中进行此操作.任何想法如何实现这一点.我知道我们可以使用.focus和.blur方法来捕获选项卡的活动/不活动状态,但是当浏览器最小化时,如何使选项卡带有颜色.

I am planning to do this in jQuery. Any idea how this could be achieved. I know we could use the .focus and .blur method to catch the tab active/inactive status but how to make the tab blip with color when the browser is minimized.

推荐答案

您不能使用jQuery更改实际的浏览器功能,因为出于安全原因,Web内容与实际的浏览器是隔离的或沙盒化的.

You can't change the actual browser functionality with jQuery because the web content is isolated, or sandboxed, from the actual browser for security reasons.

如果您确实想要一些有用的东西,则必须制作一个浏览器插件,然后该插件需要由用户下载并启用.

If you really want something that will work you'll have to make a browser addon, which would then need to be downloaded and enabled by the user.

查看此相关答案

这篇关于如何用颜色突出显示浏览器选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆