avatar

麦兜的小站

MDO.INK

  • 首页
  • 随笔
  • 知识库
  • 归档
  • 动态
  • 标签
  • 关于
Home Bloxflip Rain Autojoin
文章

Bloxflip Rain Autojoin

Posted 2025-03-20 Updated 2025-03- 20
By power 已删除用户
4~6 min read

Wrap lines

1.  // ==UserScript==
2.  // @name         Bloxflip Rain Autojoin
3.  // @namespace    http://tampermonkey.net/
4.  // @version      11.0
5.  // @description  sends notification and plays a sound when a rain event starts and joins it
6.  // @author       blueiicey
7.  // @match        https://bflip.com/*
8.  // @icon         https://bflip.com/favicon.ico
9.  // @grant        none
10.  // ==/UserScript==

12.  /*
13.  https://greasyfork.org/en/scripts/493122-bloxflip-auto-rain/code
14.  https://greasyfork.org/en/scripts/447509-bloxflip-spam-blocker/code
15.  https://dashboard.hcaptcha.com/welcome_accessibility
16.  https://nopecha.com/ free tier
17.  */

19.  //gets notif perms
20.  //console.log("notif perms: "+Notification.permission);
21.  if  (Notification.permission ===  "granted")  {
22.    //don't need to request notif perms
23.  }  else  if  (Notification.permission !==  "denied")  {
24.    //get notif perms
25.   alert("Allow notifications to get notified when a rain occurs")
26.    Notification.requestPermission().then(permission =>  {
27.   console.log(permission)
28.    });
29.  };

32.  //init var
33.  var activeRain =  false;

35.  //checks for rain, alerts user and joins rain
36.  setInterval(async  function()  {
37.    //get chat history
38.    let history =  await fetch('https://api.bloxflip.com/chat/history');
39.    let chat = JSON.parse(await history.text());  //parse it

41.    if(chat.rain.active &&  !activeRain)  {  //check rain status
42.    var sound =  new  Audio('https://www.myinstants.com/media/sounds/cash-register-sound-fx.mp3');
43.   sound.play();
44.    new  Notification(chat.rain.prize.toString()  +  " R$ Rain",  {
45.   body:  "Hosted by "  + chat.rain.host
46.    });
47.   activeRain =  true;  //set var
48.    //click join rain bttn
49.    const b=document.querySelectorAll('div[class*="chatBanner"]');for(const a of b){const p=a.querySelectorAll('p');for(const c of p)if(c.textContent.trim()==='Join For Free'){c.click();break}}
50.    }  else  if  (!chat.rain.active && activeRain)  {  //rain stopped
51.   activeRain =  false;  //set var
52.    };
53.  },  2000);
随笔
License:  CC BY 4.0
Share

Further Reading

Mar 24, 2025

一个人的“成熟”标准

过去我一直就认为,家和似乎仅仅只是一个人幸福的起点,并不是天花板。我们应该追求的幸福标准能够更高才对,但后来当我接触到了越来越多的案例之后,我才发现,一个人的“成熟”标准,其实就是从能否认命开始的。 ...

Mar 21, 2025

An example for sending Web Push notifications, using web-push-php

Navigatingthroughthecommitsandfileswillhelpyoubuild: ontheclient auserfriendlyopt-inpushnotificati...

Mar 20, 2025

Bloxflip Rain Autojoin

Wraplines 1.//==UserScript== 2.//@nameBloxflipRainAutojoin 3.//@namespacehttp://tampermonkey.net/ 4....

OLDER

Notification 浏览器桌面通知Notification是HTML5新增的API,用于想用户配置和现实桌面通知

NEWER

sirwsl/uploadWheel: 普通文件上传、大文件切片、视频转m3u8,上传minIO or OSS

Recently Updated

  • 如何实现接口幂等性
  • 10个npm工具包
  • How to set up PHP7.4 on MacOS.
  • Automa:一键自动化,网页数据采集与工作流程优化专家Automa:解锁自动化
  • Mac 下用 brew 搭建 LNMP

Trending Tags

thinkphp clippings

Contents

©2025 麦兜的小站. Some rights reserved.

Using the Halo theme Chirpy