Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

A Chrome extension that automatically imports Unranked Matchmaking, Wingman, and CS2 Limited Test Matches to Leetify.

Notifications You must be signed in to change notification settings

leetify/leetify-gcpd-upload

Repository files navigation

Leetify Unranked Uploader

A Chrome extension that automatically imports Unranked Matchmaking, Wingman, and CS2 Limited Test Matches to Leetify. Find out more on the Leetify Blog!

Available in the Chrome Web Store

How it works

This is a high-level overview so you can find your way around this codebase a bit easier:

A match sync is started every 15 minutes, when you visit Leetify or the Steam GCPD page for CS, when you click either the extension icon in the Chrome toolbar, or the “Sync matches now” button on the extension options page.

The extension loads an offscreen Leetify page in the background and retrieves your access token for Leetify.

Then it requests the GCPD pages for Scrimmage (which includes CS2LT matches) and extracts matches from the response, one after another, until it doesn't find any more matches that still have a demo download link. It sends the demo download links and the timestamps of each match to Leetify (via the access token from before), which saves all new matches as manual uploads. They'll show up on the Data Sources page and will be queued; after a bit of waiting (usually no more than a few minutes), they'll also show up in your Match History on Leetify (but not on the Dashboard or Profile).

If your Steam session has expired and the extension can't actually load the GCPD page, it'll try to refresh your session.

After Scrimmage, the extension will again request GCPD pages for Wingman, filter out ranked or unranked matches (if configured to do so), and send the found matches to Leetify.

You can independently enable or disable: the sync every 15 minutes, the sync on Leetify visits, and on GCPD visits. You can also independently enable or disable: unranked 5v5, ranked Wingman, and unranked Wingman. CS2LT matches look exactly like unranked 5v5 or unranked Wingman matches from CS:GO to the extension, and cannot be disabled independently.

If you're not logged in to either Steam or Leetify, the sync will fail. The extension icon in the Chrome toolbar will show a red ERR badge, and the status page will show an error message.

If you don't want to see a specific match on Leetify, you can delete it afterwards on the Data Sources page. Matches uploaded via the extension are considered manual uploads by Leetify, so they are only displayed to the user who uploaded them (i.e. the Leetify account logged in when the extension uploaded the match). You can share these matches with your friends by sending them the link.

Contributing/Support

We're not accepting PRs at this time. If you need help, please contact support. Please post your feedback on Discord!

Running locally

  1. Clone this repo.
  2. Head to chrome://extensions.
  3. Enable developer mode, click Load unpacked, and select the directory you cloned to (the directory containing manifest.json).

See the Chrome Extension docs for info about Chrome's APIs.