Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
一个弹幕js.🔫
<script src="biu.min.js"></script>
var anime = new Biu.anime();
var biu = new Biu({
name: 'biubiu',
socket: location.protocol + '//' + location.hostname + (location.port ? ':'+location.port : '') ,
onMessage:(data)=>{
anime.run(data)
}
});
npm i --save biujs
import Biu from 'biujs';
var anime = new Biu.anime();
var biu = new Biu({
name: 'biubiu',
socket: location.protocol + '//' + location.hostname + (location.port ? ':'+location.port : '') ,
onMessage:(data)=>{
anime.run(data)
}
});
Biu 用来接收服务端消息,Biu.anime 是一个动画扩展,你可以直接使用,如果不满足你的需求,也可以在 onMessage
里自己写。
name:在服务端申请的项目名称,实际对应 socket.io
中的一个 namespace
socket:服务端地址
onConnect:连接成功时的回调
onMessage:接收消息时的回调
open:连接ws,实例化时自动调用
stop:关闭
send:发送消息,接收 string 或者 object 的参数,object时一定要有text
字段(弹幕内容)
colors:弹幕颜色,接收一个数组,默认值:['#f55b15', '#764ba5', '#00a762', '#0193e6', '#e0463c']
maxDuration:弹幕最大时间
minDuration:弹幕最小时间(每个弹幕会在最大最小时间中取一个随机值)
run:显示弹幕
show:显示
hide:隐藏
FAQs
bullet screen js library
The npm package biujs receives a total of 0 weekly downloads. As such, biujs popularity was classified as not popular.
We found that biujs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.