步驟: 1.進入鬥魚直播; 2.按下f12; 3.點擊Console; 4.複製下方代碼黏貼至Console下,回車就會自動輸彈幕; 友情提醒:若想終止請在console下輸入stop()--或--按f5; 代碼如下: const area = document.getElementsByClass ...
步驟:
1.進入鬥魚直播;
2.按下f12;
3.點擊Console;
4.複製下方代碼黏貼至Console下,回車就會自動輸彈幕;
友情提醒:若想終止請在console下輸入stop()--或--按f5;
代碼如下:
const area = document.getElementsByClassName('ChatSend-txt')[0]
const btn = document.getElementsByClassName('ChatSend-button ')[0]
const danmu = '輸入想發的彈幕內容'
let interval
function start()
{
interval = setInterval(function(){
area.value = danmu
btn.click()
},1000)
}
function stop()
{
clearInterval(interval)
}
start()