/** * 监听浏览器标签页的显示与隐藏 */ class ListenerPageVisibility { constructor () { // 设置隐藏属性和改变可见属性的事件的名称 this.hidden = '' this.visibilityChange = '' if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support this.hidden…
function ScreenSaver(settings){ this.settings = settings; this.nTimeout = this.settings.timeout; document.body.screenSaver = this; // link in to body events document.body.onmousemove = ScreenSaver.prototype.onevent; document.body.onmousedown = Screen…