Giter Site home page Giter Site logo

cgenhancer's Introduction

CG Enhancer

Github repository of CG Enhancer

The goal of this script is to make the user's life easier, especially during multi/contests. It comes with a bunch of features (see below for an exhaustive or-so list).

The script currently works on chrome, chromium and firefox. It might work on chromium-based browser, such as opera and safari, but was not tested.

It is only my second time using javascript (and first with jquery/angular) so the code is without doubt full of atrocities, bad habits and more. Feel free to report them or to improve the code if you're brave enough to have a look at it. :)

Angular debug mode is used for the agent panel (quick selection and such) and might use a lot of RAM. You can disable it by setting useAgentModule to false.

How to install

This tool is a userscript. It has to be installed through a userscript manager, such as Tampermonkey or Violentmonkey. Greasemonkey is not supported. If you have none, consider violentmonkey which is open source. When installed, click here to install CG Enhancer.

Note that since it is only beta testing, yoir browser might crash when trying the script. Be ready. If it crashes repeatedly, refreshing the tab before almost instantly the first time might help. If not, open the console and send me the error if there is any.

Options

The script currently has no option panel. However since it's a userscript, any user can modify it. Options are to be found at the beginning of the script (line 25 or around). Look for //options in the source code. As of today, two options are available:

  • useAgentModule: allow the agent options. This is the only part of the script that uses the angular debug mode. This mode might use a lot of RAM, so disable it to save some if CG is slower than usual. Default: true
  • forceExternRequest: Make the leaderboard api request extern. It allows you to play against AIs of higher leagues in the agent panel but this might disrupt other features if you are not in the top1000. Default: false
  • enableSound: self-explanatory. Default: false
  • notifToRemove: Array storing the different notifications to remove. They are about 30 different types of notifications on CG, a list is available above this option. Default: ['clash-invite', 'following']

Features

Notifications

  • Disable sound
  • Disable clash-invite and follow notifications For further personalization, look for // disallow sound for notifications and // notifications in the source code (no panel yet).

Global

  • disable community red notification at the top while browsing CG.

IDE

  • Full screen console if CG sync is used.

FullConsole

Agent panel

  • Swap button like CG spunk
  • Button for fast selection (IDE / Arena / Boss agents)
  • Input for fast player selection ('Magus', 'Azkellas'). You can only access bots from your league and below.

AgentExample

History tab

  • Display the full date
  • Possibility to rename submits
  • Possibility to save the rank and the elo of submits
  • Possibility to hide submits from the list

HistoryExample

Last battles tab

  • Disable the tv-battle at opening (game is still loaded but not displayed)
  • Show opponents' rankings (if in the top1000)
  • Highlight unexpected results (winning against a better opponent / losing against a worse opponent)
  • Display draws (with angular debug mode enabled)

LastBattlesExample

LastBattlesDraws

Possible todos

Tab history

  • Possibility to erase submits (bin tab)
  • Possibility to create tabs
  • Automatically store the submit rank

Last battles:

  • Add winrates (with cgstats)
  • Highlight timeouts

IDE:

  • Replace the <input/> fast agent choice by a reactive <ng-select> (help needed)
  • Add the possibility to chose between the local leaderboard (current div and lower) and global leaderboard (from legend to bottom) to chose agents
  • Synchronize storage data for multi browser support (requires making it an app)

Console:

  • Possitility to resize it (vertical)
  • Minimize the console output (horizontal)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.