GithubHelp home page GithubHelp logo

tfrizzell / harnessnation-plus Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.14 MB

WebExtension for players of harnessnation.com

License: MIT License

JavaScript 1.64% HTML 31.30% CSS 6.11% TypeScript 60.96%
chrome-extension edge-extension firefox-addon webextension

harnessnation-plus's Introduction

build and test

harnessnation-plus

HarnessNation+ Extension - Enhance your HarnessNation experience with these client-side add-ons and fixes!

Features

See the features page on our wiki for a complete list of features, bug fixes, and other enhancements.

Installation

Google Chrome

Install HarnessNation+ on Google Chrome

Microsoft Edge

Install HarnessNation+ on Microsoft Edge

Mozilla Firefox

Install HarnessNation+ on Mozilla Firefox

Other Chromium-based Browsers

Other Chromium-based browsers, such as Brave, Opera, and Vivaldi are compatible with the Google Chrome version of HarnessNation+

harnessnation-plus's People

Contributors

dependabot[bot] avatar tfrizzell avatar

Watchers

 avatar  avatar

harnessnation-plus's Issues

Breeding report sometimes doesn't generate

Reported to me by a users, and reproduced periodically in Google Chrome. When clicking the "+ Report" button on the breeding stable broodmare section, the action sometimes doesn't fire. This is likely the same on the public stallion registry page.

Long-standing settings bug caused by asynchronicity

Due to the modular rewrite and asynchronous loading method, HN+ has encountered some timing issues where DataTables have already loaded prior to the scripts loading. To combat this, we'll need to create new versions that can be loading synchronously.

Externalize Configuration

With the introduction of firestore db usage last year, it may be a good idea to utilize it to externalize the extension's configuration. This would allow updating of default configuration values without the needed to deploy a new version of the extension.

Add an options page to allow users to configure how long their datatables state is saved for

We're current setting stateDuration statically to 31557600 in our DataTables configuration modification to help ensure the state persists beyond a few hours. To provide users with a better experience, we should create an options page to allow users to select how long they want to state to persist for.

Tasks

  • Create an options page
  • Provide an option to set the persistence timeout for tables on the Main Stable page
  • Provide an option to set the persistence timeout for tables on the Breeding Stable page
  • Provide an option to set the persistence timeout for tables in the Progeny List modal
  • Update the existing content scripts to use the new settings

Make stallion score thresholds configurable

Following #33, it may be useful to also externalize the thresholds for stallion score classification. They are currently hard-coded, meaning changing thresholds will require a published update. Moving that into the configuration would allow for on-the-fly changes should the need arise.

Upgrade to manifest v3, typescript

With Chrome phasing out support for manifest v2, the extension will need to be updated to manifest v3. While doing so, I'd also like to switch the code base over to typescript.

Add a stud fee calculator

In tfrizzell/hn-plus-legacy we had a stud fee calculator with formulas created by Niek. We should re-implement this feature.

Tasks

  • Add a button next to the breeding fee inputs on https://www.harnessnation.com/breeding/manage/stallions to allow the user to calculate their stud fee
  • When the button is clicked, the following should happen:
    • Check to see if the user has a preferred formula (see below) setting saved
    • If the setting isn't saved, present popup with the formula (see below) options
  • Once a formula is selected, fetch the data and generate the stud fee

Formulas

  1. Apex Formula (default)
    • Studs with no racing offspring: Calculate their average earnings per start over the racing career and round to the nearest 1000
    • Studs with racing offspring: Take 25% of their average earnings per starter and round to the nearest 1000
  2. Ridge Formula
    • Studs with no racing offspring: Calculate 5000 + 5 * lifetime earnings / 100 and round to the nearest 1000
    • Studs with racing offspring: Calculate 5000 + 5 * average earnings per starter / 10 and round to the nearest 1000

DataTables settings sometimes don't apply

With the changes to manifest v3, I've found there are some instances where the DataTables settings don't apply. This seems to be a timing issue where the <script> tag is loaded before the MutationObserver is created.

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.