Greasy Fork

Greasy Fork is available in English.

H5版饿了么自动好评

H5版饿了么批量自动好评

目前为 2018-08-02 提交的版本,查看 最新版本

// ==UserScript==
// @name        H5版饿了么自动好评
// @description H5版饿了么批量自动好评
// @version     1.0.2
// @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('div[class*="order-star-"] > label:nth-child(5)')) {
            document.querySelector('div[class*="face-"] > div:nth-child(3)').click();
            document.querySelector('div[class*="order-star-"] > label:nth-child(5)').click();
            setTimeout(() => {
                document.querySelectorAll('div[class*="star--"]')[0].querySelector('[class*="star-"]:nth-child(5)').click();
                document.querySelectorAll('div[class*="star--"]')[1].querySelector('[class*="star-"]:nth-child(5)').click();
                setTimeout(() => {
                    document.querySelector('div[class*="food-block-"] + div[class*="create-"] > span').click()
                }, 20);
            }, 20);
        }
	} else if (location.pathname == "/aftercomment/") { document.querySelector('.check-button').click(); }
}, 1000);