Greasy Fork

Greasy Fork is available in English.

H5版饿了么自动好评

H5版饿了么批量自动好评

当前为 2018-06-08 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        H5版饿了么自动好评
// @description H5版饿了么批量自动好评
// @version     1.0.1
// @author      JoJunIori
// @namespace   [email protected]
// @grant       unsafeWindow
// @include     https://h5.ele.me/*
// ==/UserScript==

// 除了用来自动好评之外根本没什么用的网页
// 所以就随便写写啦
setInterval(function() {
	if (location.pathname == "/order/") {
		if (document.querySelector('.cardbutton.alert')) {
			document.querySelector('.cardbutton.alert').click();
		}
	} else if (location.pathname == "/order/detail/") {
        if (document.querySelector('.order-star-2P-CH .star-2R8L5:nth-child(5)')) {
            document.querySelector('.face-33o2P:nth-child(3)').click();
            document.querySelector('.order-star-2P-CH .star-2R8L5:nth-child(5)').click();
            setTimeout(() => {
                document.querySelectorAll('.order-star-3k-LZ')[0].querySelector('.star-2R8L5:nth-child(5)').click();
                document.querySelectorAll('.order-star-3k-LZ')[1].querySelector('.star-2R8L5:nth-child(5)').click();
                document.querySelector('.create-3Zfg2').click();
            }, 20);
        }
	} else if (location.pathname == "/aftercomment/") { document.querySelector('.check-button').click(); }
}, 1000);