fly63前端网

www.fly63.com

首页文章资源工具教程 栏目
  • 关于我们
  • 网站投稿
  • 赞助一下
搜索

在线工具_工作生活好帮手

打造各种简单、易用、便捷的在线工具,网友无需注册和下载安装即可使用

点击查看

关闭

提交网站

iNotify
分享
复制链接
新浪微博
QQ 好友

扫一扫分享

网站地址:https://git.io/iNotify
GitHub:https://github.com/jaywcjlove/iNotify
网站描述:实现浏览器的 title 闪烁、滚动、声音提示等系统通知

JS实现浏览器标题的闪烁,滚动,语音提示,Chrome / Safari / FireFox / IE通知。没有依赖关系。它不会干扰任何JavaScript库或框架。具有合理的占用空间5.05kb(压缩后:1.75kb) 


安装

您将需要在系统上安装Node.js。

# v2.x
$ npm install @ wcjiang / notify --save
# v1.x  
$ npm install title-notify --save


使用

import Notify from '@wcjiang/notify';

const notify = new Notify({
  message: 'There is message.', // page title.
  effect: 'flash', // flash | scroll, Flashing or scrolling
  openurl:'https://github.com/jaywcjlove/iNotify', // Click on the pop-up window to open the connection address
  onclick: () => { // Click on the pop-up window trip event
    // Programmatically closes a notification.
    notify.close();
    console.log('---')
  },
  // Optional playback sound
  audio:{
    // You can use arrays to pass sound files in multiple formats.
    file: ['msg.mp4','msg.mp3','msg.wav']
    // The following is also work.
    // file: 'msg.mp4'
  },
  // Title flashing, or scrolling speed
  interval: 1000,
  // Optional, default green background white text. Favicon
  updateFavicon:{
    // favicon font color
    textColor: '#fff',
    // Background color, set the background color to be transparent, set the value to "transparent"
    backgroundColor: '#2F9A00' 
  },
  // Optional chrome browser notifications,
  // The default is not to fill in the following content
  notification:{
    title:'Notification!', // Set notification title
    icon:'', // Set notification icon, The default is Favicon
    body:'You have a new message!', // Set message content
  }
});
 
notify.player();


链接: https://fly63.com/nav/3151

more>>
相关栏目
layer
layer是一款口碑极佳的web弹层组件
点击进入GitHub
iScroll.js
IScroll是移动页面上被使用的一款仿系统滚动插件。
官网GitHub
wangEditor
基于javascript和css开发的 Web富文本编辑器
官网GitHub
ueditor
由百度web前端研发部开发所见即所得富文本web编辑器
官网GitHub
highlight
Highlight.js 是一个用 JavaScript 写的代码高亮插件,在客户端和服务端都能工作。
官网GitHub
UglifyJS
一个js 解释器、最小化器、压缩器、美化器工具集
官网GitHub
lozad.js
高性能,轻量级,可配置的懒加载图片工具
官网GitHub
Sortable.js
简单灵活的 JavaScript 拖放排序插件
官网GitHub
validate.js
表单提供了强大的验证功能,让客户端表单验证变得更简单
官网GitHub
Draggin.js
一款兼容移动手机的js拖拽插件
官网GitHub
lazysizes.js
响应式图像延迟加载JS插件【懒加载】
官网GitHub
cropper.js
通过canvas实现图片裁剪
官网GitHub
clipboard.js
浏览器中复制文本到剪贴板的插件,不需要Flash,仅仅2kb
官网GitHub
siema
轻量级简单的纯 Js轮播插件
官网GitHub
Mermrender
用于生成序列和UML图的RESTful渲染管道
官网GitHub
Editor.js
JSON格式输出数据的富文本和媒体编辑器
官网GitHub

手机预览