BOSS直聘接收消息提醒

BOSS直聘手机APP的通知权限全开了,接收到消息也不会立刻提醒,因此写个脚本监听消息。

用BOSS直聘网页首页( https://www.zhipin.com/guangzhou/ )当浏览器后台标签页,挂后台,接收到消息就发送axios请求调用自己的消息推送接口提醒自己。

JavaScript油猴脚本代码:

// ==UserScript==
// @name         BOSS直聘消息提醒
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.zhipin.com/guangzhou/
// @require      https://unpkg.com/axios@0.27.2/dist/axios.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let newMsgNumber=0;
    setInterval(function () {
        if(Number(document.getElementsByClassName('nav-chat-num')[0].textContent)!=newMsgNumber){
            newMsgNumber=Number(document.getElementsByClassName('nav-chat-num')[0].textContent);
            if(newMsgNumber!=0){
                //发送axios请求,调用自己的消息推送接口(例如我这里用的是企业微信的消息推送)
            }
        }
    },5000);
})();
posted @   harglo  阅读(164)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫
点击右上角即可分享
微信分享提示