Greasy Fork

来自缓存

Greasy Fork is available in English.

神巴水本

自动点击水本按钮。

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         神巴水本
// @namespace    https://github.com/mccleaner/robscript/
// @version      0.1
// @description  自动点击水本按钮。
// @author       MC清理大师
// @match        http://sp.pf.mbga.jp/12007160/*
// @icon         http://sp.pf.mbga.jp/favicon.ico
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	console.log('神巴水本脚本:加载');
	var start = document.createElement("button");
	start.id = "114514";
	start.textContent = "►";
	start.style.width = "60px";
	start.style.height = "20px";
	start.style.align = "center";
	start.onclick = function (){
		console.log('神巴水本脚本:开始');
		var event = document.createEvent('Events');
		event.initEvent('touchend', true, true);
		window.b = setInterval(function(){
			//document.querySelectorAll('#play')[0].dispatchEvent(event);
			//document.querySelectorAll('#user_battle_load_main')[0].dispatchEvent(event);
			document.getElementsByClassName("touch-area-1")[0].dispatchEvent(event);
		},3000);
		return;
	}
    var stop = document.createElement("button");
	stop.id = "1919810";
	stop.textContent = "■";
	stop.style.width = "60px";
	stop.style.height = "20px";
	stop.style.align = "center";
	stop.onclick = function (){
	console.log('神巴水本脚本:停止');
	clearInterval(b);
	return;
	}
	document.getElementsByClassName("game-header")[0].appendChild(start);
	document.getElementsByClassName("game-header")[0].appendChild(stop);
})();