Coinbrawl

try to take over the world!

2016-02-26 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Coinbrawl
// @version      0.24
// @description  try to take over the world!
// @author       You
// @match        https://www.coinbrawl.com/*
// @grant        none
// @namespace https://greasyfork.org/users/25633
// ==/UserScript==

//menu
$('li:has(a[href$="/referrals"])').remove();

//ads
$('div.panel-game-content:first').hide();
$('div.col-sm-9 > center').hide();
$('div.col-sm-3').hide();
$('div.ad-tag').hide();

if ( $("li.active a[href='/").length == 1 ){

    $('div.col-sm-6').hide();
    $('div.col-sm-4').hide();
    $('div.col-sm-8').hide();

    $('#battle-table > div > p > a')[0].bind( "click", function() {
          attackUser();
    });
}

function attackUser(){
    $('tbody:first > tr').each(function(){

        if ( $(this).find('strong.text-success').html() > 0 ){

            if ( $(this).find('div.text-warning').length > 0 ) {
                
                $(this).find('td > a')[0].click();
                console.log('[amber] Attacking user for ' + $(this).find('strong.text-success').html());
            }
            
        }

        if ( $(this).find('strong.text-success').html() > 0 ){

            if ( $(this).find('div.text-success').length > 0 ){

                $(this).find('td > a')[0].click()
                console.log('[green] Attacking user for ' + $(this).find('strong.text-success').html());
            }
        }
    });
}