diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..2987e44 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: leetcode-rating-predictor # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/README.md b/README.md index 2abfa27..19ae1bb 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ You can install the extension from [Chrome Web Store](https://chrome.google.com/ ## Website -You can also visit [lcpredictor.herokuapp.com](https://lcpredictor.herokuapp.com/) to get your rating changes. +You can also visit [lcpredictor.onrender.com](https://lcpredictor.onrender.com/) to get your rating changes.
@@ -71,7 +71,7 @@ This project is written in Node + MongoDB + Redis tech stack. We can divide it i
| 2. | Website | Js, Ejs |
| 3. | API | Js |
-## Backgound
+## Background
It is the most important part of the project. It's job is to fetch the data from leetcode and predict the contest ratings periodically.
diff --git a/chrome-extension/background.js b/chrome-extension/background.js
index 5ee736c..efd8bfb 100644
--- a/chrome-extension/background.js
+++ b/chrome-extension/background.js
@@ -24,8 +24,7 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
});
const API_URLS = [
- "https://leetcode-rating-predictor.herokuapp.com/api/v1/predictions",
- "https://leetcode-predictor.herokuapp.com/api/v1/predictions",
+ "https://lcpredictor.onrender.com/api/v1/predictions"
];
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
diff --git a/chrome-extension/foreground.js b/chrome-extension/foreground.js
index 857ed4f..a8bd427 100644
--- a/chrome-extension/foreground.js
+++ b/chrome-extension/foreground.js
@@ -1,5 +1,5 @@
-if (!window.CFPredictorInjected) {
- window.CFPredictorInjected = true;
+if (!window.LCPredictorInjected) {
+ window.LCPredictorInjected = true;
let predictionsTimer;
let isListenerActive = false;
const setEventListener = () => {
@@ -86,7 +86,7 @@ if (!window.CFPredictorInjected) {
handle = tds[1].querySelector("span").innerText.trim();
url = ""; // TODO: get data_region in this case
}
- const data_region = /^https:\/\/leetcode-cn.com/.test(url)
+ const data_region = /^https:\/\/leetcode.cn/.test(url)
? "CN"
: "US";
handlesMap.set(
@@ -156,6 +156,10 @@ if (!window.CFPredictorInjected) {
row.appendChild(td);
}
rowsUpdated.set(rowIndex, true);
+ } else {
+ console.log(
+ `handle not found in the results: ${id}`
+ );
}
} catch (err) {
console.warn(err);
diff --git a/chrome-extension/manifest.json b/chrome-extension/manifest.json
index c7cb51e..905e7b1 100644
--- a/chrome-extension/manifest.json
+++ b/chrome-extension/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "LC Predictor",
- "version": "1.0.0",
+ "version": "1.0.1",
"short_name": "LC Predictor",
"background": {
@@ -33,7 +33,6 @@
],
"host_permissions": [
"https://leetcode.com/*",
- "https://leetcode-predictor.herokuapp.com/*",
- "https://leetcode-rating-predictor.herokuapp.com/*"
+ "https://lcpredictor.onrender.com/*"
]
}
\ No newline at end of file
diff --git a/chrome-extension/popup.html b/chrome-extension/popup.html
index 9cd34ec..d21edb4 100644
--- a/chrome-extension/popup.html
+++ b/chrome-extension/popup.html
@@ -21,7 +21,7 @@
It takes about 4-5 days for leetcode to update the contest ratings of participants. So you have to wait for a long time to know your rating changes. This application predicts accurate leetcode rating changes for all the contestants within a few minutes of completion of the contest. + +
++ It implements leetcode's latest rating prediction algorithm. Rating predictions are very close to the original rating but the accuracy may not be 100% due to changes in contest rankings after the completion of contest (leetcode rejudges some submissons). +
+It takes around 15 minutes after the completion of contest to make predictions. Sometimes leetcode takes more time to update the final rankings. So it also rejudges the ratings after 1 hour of the contest.
+You need to install LC Predictor extension from Chrome Web Store. After installing the extension you will see the rating changes on the Leetcode contest ranking pages. +
+You can contribute by creating issues, feature/ pull requests in the GitHub Repo. Any meaningful contributions you make are greatly appreciated. +
+