Greasy Fork

Greasy Fork is available in English.

H5版饿了么自动好评

H5版饿了么批量自动好评

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

// ==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);