这一次,我jue了屎黄(PS:我的获赞量还不够)

前一段时间看到一个哥们满足五十天要求后刷了一天多文章才刷到20000的阅读量要求,再看看我的天数(25),阅读量才四千多,到时候我不也得狂刷文章?然后我就开始找自动刷文章的脚本。前两天在 Greasy Fork找L站自动看文章的脚本,在论坛里也看到有其他佬友写的脚本,但是试了几个,都不够美丽。依稀又想起前天某个佬友在某个帖子下的评论,需要看带蓝色点点的文章才可以增加阅读任务数量。于是发挥了程序员闲的蛋T没事找S的精神,自己写了脚本。
代码地址:jueLinuxDo/linuxDo.js at main · xiaoye6688/jueLinuxDo · GitHub

本来想上传到 Greasy Fork 的,奈何新用户提示我不能上传

按钮效果

image

`// 创建按钮
const button = document.createElement(‘button’);

// 设置按钮的文本内容
button.textContent = ‘开始自动阅读’;

// 设置按钮的样式
button.style.position = ‘fixed’;
button.style.bottom = ‘10px’; // 距离底部10像素
button.style.left = ‘10px’; // 距离左侧10像素
button.style.padding = ‘10px 20px’; // 按钮内边距
button.style.backgroundColor = ‘#4CAF50’; // 按钮背景颜色
button.style.color = ‘white’; // 按钮文字颜色
button.style.border = ‘none’; // 按钮无边框
button.style.borderRadius = ‘5px’; // 按钮圆角
button.style.cursor = ‘pointer’; // 鼠标指针样式

// 定义定时器变量
let timer = null;
let isReading = false;

// 添加点击事件监听器
button.addEventListener(‘click’, function () {
// 判断链接是不是https://linux.do/,必须是linux.do主页才能使用
if (window.location.href !== ‘https://linux.do/’ && isReading === false) {
alert(‘请在linux.do主页使用’);
// 跳转到linux.do主页
window.location.href = ‘https://linux.do’;
return;
}
if (!isReading) {
let index = 0;
// 创建一个定时器,按顺序点击未读文章列表中的每一个
timer = setInterval(function () {
// 获取所有未读文章
const elements = document.querySelectorAll(‘.badge.badge-notification.new-topic’);
if (elements.length != 0) {
// alert(‘正在阅读第’ + (index + 1) + ‘篇文章’);
console.log(‘正在阅读第’ + (index + 1) + ‘篇文章’);
elements[0].click();
index++;
setTimeout(function () {
window.history.back();
}, 3000);
} else {
// 定时器任务执行完毕后,触发end事件并跳到页面末尾
// clearInterval(timer);
document.dispatchEvent(new Event(‘end’));

        }
    }, 5000); // 每5秒阅读一篇文章

    // 更改按钮文本
    button.textContent = '暂停自动阅读';
    isReading = true;
} else {
    // 暂停定时器
    clearInterval(timer);
    // 更改按钮文本
    button.textContent = '开始自动阅读';
    isReading = false;
}

});

// 将按钮添加到body中
document.body.appendChild(button);

// 处理end事件,跳到页面末尾
document.addEventListener(‘end’, function () {
window.scrollTo(0, document.body.scrollHeight);
});
`

17 个赞

为什么代码显示成这样了

1 个赞

升级很迫切啊

1 个赞

你号没了

1 个赞

帮你发出来了

// 创建按钮
const button = document.createElement('button');

// 设置按钮的文本内容
button.textContent = '开始自动阅读';

// 设置按钮的样式
button.style.position = 'fixed';
button.style.bottom = '10px'; // 距离底部10像素
button.style.left = '10px';  // 距离左侧10像素
button.style.padding = '10px 20px'; // 按钮内边距
button.style.backgroundColor = '#4CAF50'; // 按钮背景颜色
button.style.color = 'white'; // 按钮文字颜色
button.style.border = 'none'; // 按钮无边框
button.style.borderRadius = '5px'; // 按钮圆角
button.style.cursor = 'pointer'; // 鼠标指针样式

// 定义定时器变量
let timer = null;
let isReading = false;

// 添加点击事件监听器
button.addEventListener('click', function () {
    // 判断链接是不是https://linux.do/,必须是linux.do主页才能使用
    if (window.location.href !== 'https://linux.do/' && isReading === false) {
        alert('请在linux.do主页使用');
        // 跳转到linux.do主页
        window.location.href = 'https://linux.do';
        return;
    }
    if (!isReading) {
        let index = 0;
        // 创建一个定时器,按顺序点击未读文章列表中的每一个
        timer = setInterval(function () {
            // 获取所有未读文章
            const elements = document.querySelectorAll('.badge.badge-notification.new-topic');
            if (elements.length != 0) {
                // alert('正在阅读第' + (index + 1) + '篇文章');
                console.log('正在阅读第' + (index + 1) + '篇文章');
                elements[0].click();
                index++;
                setTimeout(function () {
                    window.history.back();
                }, 3000);
            } else {
                // 定时器任务执行完毕后,触发end事件并跳到页面末尾
                // clearInterval(timer);
                document.dispatchEvent(new Event('end'));

            }
        }, 5000); // 每5秒阅读一篇文章

        // 更改按钮文本
        button.textContent = '暂停自动阅读';
        isReading = true;
    } else {
        // 暂停定时器
        clearInterval(timer);
        // 更改按钮文本
        button.textContent = '开始自动阅读';
        isReading = false;
    }
});

// 将按钮添加到body中
document.body.appendChild(button);

// 处理end事件,跳到页面末尾
document.addEventListener('end', function () {
    window.scrollTo(0, document.body.scrollHeight);
});
3 个赞

不是 你们为啥都这么刷

1 个赞

不会的
我号都还在

1 个赞

看我开新帖 给你们讲怎么刷 :tieba_025: :tieba_025:

是每个蓝点都要停留两秒吧?(包含回复)
这个脚本能做到吗?

1 个赞

因为要到信任3

刑,快发快发 :tieba_025: :tieba_025: :tieba_025:

没必要刷的,刷的后面也需要补回来(bushi)

1 个赞

我自己用的效果,确实在涨
image

很刑啊

jue到了 :grinning:

这个功能的油猴脚本不是几个月前就有了

用了几个感觉不好用,看的有点慢,屎黄的阅读任务完成判断逻辑是啥样的

6666

发了 发了 ====》 始皇别封我 分享下思路

不涉及脚本 不会封吧 :tieba_025: