/** * 监听浏览器标签页的显示与隐藏 */ class ListenerPageVisibility { constructor () { // 设置隐藏属性和改变可见属性的事件的名称 this.hidden = '' this.visibilityChange = '' if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support this.hidden
Firefox 新建 ~/.mozilla/firefox/rre9emvh.default/chrome/userChrome.css (大概不同人的 rre9emvh.default 目录会有不同的名字?) 内容如下 /* * Bookmarks toolbar is visible only on new tab page, just like Chrome. * * Screenshot: https://vimeo.com/235059188 * Video: https://vime