Giter VIP home page Giter VIP logo

hamsterkeygenweb's Introduction

Hamster Promo Code Generator

image

This project is a web-based application for generating promo codes for various games. The application allows users to select a game, choose the number of promo codes they want to generate, and then generates the codes while showing the progress. The application also includes options to copy the generated codes to the clipboard.

Features

  • Game Selection: Users can select from a list of available games.
  • Key Count Selection: Users can choose the number of keys to generate (1 to 10).
  • Progress Indication: The application shows a progress bar and updates the user on the current status of key generation.
  • Generated Keys Display: Once the keys are generated, they are displayed in a list with options to copy each key individually or all keys at once.
  • Copy to Clipboard: Users can copy individual keys or all generated keys to the clipboard with a single click.
  • Responsive Design: The application is designed to work well on various screen sizes.

Getting Started

To get started with the project, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/ShafiqSadat/HamsterKeyGenWeb.git
  2. Open the Project: Navigate to the project directory and open the index.html file in your web browser.

Usage

  1. Select a Game:

    • Choose a game from the dropdown menu.
  2. Select Number of Keys:

    • Choose the number of keys you want to generate from the dropdown menu.
  3. Generate Keys:

    • Click the "Generate Keys" button to start the key generation process.
    • The form sections will be hidden, and a progress bar will indicate the progress of key generation.
  4. View and Copy Keys:

    • Once the keys are generated, they will be displayed in a list.
    • Click the "Copy Key" button next to each key to copy it to the clipboard.
    • Click the "Copy All Keys" button to copy all generated keys to the clipboard.
  5. Generate More Keys:

    • Click the "Generate More Keys" button to reset the form and generate more keys.

Script Details

JavaScript (script.js)

  • Event Listeners:

    • Listens for the "DOMContentLoaded" event to initialize the application.
    • Handles the "click" event on the "Generate Keys" button to start the key generation process.
    • Handles the "click" event on the "Copy Key" buttons to copy individual keys.
    • Handles the "click" event on the "Copy All Keys" button to copy all keys.
    • Handles the "click" event on the "Generate More Keys" button to reset the form and allow generating more keys.
    • Handles the "click" event on the "Source Code" button to open the GitHub repository.
  • Functions:

    • generateClientId(): Generates a unique client ID.
    • login(clientId, appToken): Logs in to the API with the provided client ID and app token.
    • emulateProgress(clientToken, promoId): Emulates progress events required by the API.
    • generateKey(clientToken, promoId): Generates a promo key using the API.
    • generateUUID(): Generates a unique UUID.
    • sleep(ms): Pauses execution for the specified amount of time.
    • delayRandom(): Generates a random delay value.

CSS (styles.css)

  • Styling:
    • Modern font and color scheme.
    • Flexbox layout for centering content.
    • Rounded corners and shadows for a modern card-like appearance.
    • Transitions for interactive elements like buttons.
    • Hidden classes to show/hide elements as needed.

HTML (index.html)

  • Structure:
    • A container with form sections for game selection and key count selection.
    • Buttons for generating keys, copying keys, and generating more keys.
    • Progress bar and status updates during key generation.
    • List of generated keys with copy buttons.
    • Footer with a disclaimer and source code link.

Disclaimer

This tool is for educational purposes only. Use responsibly.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

hamsterkeygenweb's People

Contributors

akborana3 avatar shafiqsadat avatar

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.