您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto click the enter lootdrop modal and close it on vulcun.com
- // ==UserScript==
- // @name Loot Droop
- // @description Auto click the enter lootdrop modal and close it on vulcun.com
- // @match https://vulcun.com/user/lobby
- // @version 0.0.1.20160409220213
- // @namespace https://greasyfork.org/users/37930
- // ==/UserScript==
- /* jshint -W097 */
- 'use strict';
- $('.modal:not(#lootEnterModal)').on('shown.bs.modal', function() {
- setTimeout(closeModal, randomBetween(2000,5000));
- });
- $('#lootEnterModal').on('shown.bs.modal', function() {
- setTimeout(clickLootdrop, randomBetween(5000,15000)); //5s - 15s
- });
- function clickLootdrop() {
- $('#enter-lootdrop')[0].click();
- var interval = setInterval(function() {
- if($('#dropped-state:visible').length > 0) {
- clearInterval(interval);
- setTimeout(closeModal, randomBetween(2000,5000));
- }
- }, 1000);
- }
- function randomBetween(min, max) {
- return Math.random()*(max-min) + min;
- }
- function closeModal() {
- $('.modal').modal('hide')
- }