Skip to content

Commit

Permalink
Fixed bug where script would not be injected on forum pages with a no…
Browse files Browse the repository at this point in the history
…n 8 digit id & console logs showing 1 less than sent
  • Loading branch information
clay53 committed Sep 23, 2020
1 parent e8b05f6 commit 1c52726
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion background.js
@@ -1,4 +1,4 @@
const postLinkRegEx = /^https:\/\/forum.duolingo.com\/comment\/[0-9]{8}/g;
const postLinkRegEx = /^https:\/\/forum.duolingo.com\/comment\/[0-9]+/g;

chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status == "complete" && tab.url.match(postLinkRegEx)) {
Expand Down
2 changes: 1 addition & 1 deletion injected.js
Expand Up @@ -90,7 +90,7 @@ chrome.runtime.onMessage.addListener(async (request) => {
credentials: "include"
}
);
console.log(`Gave lingot ${i}/${count}.`);
console.log(`Gave lingot ${i+1}/${count}.`);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
@@ -1,6 +1,6 @@
{
"name": "Giving Duo",
"version": "1.0.1",
"version": "1.0.2",
"permissions": [
"https://forum.duolingo.com/comment/*",
"https://forum-api.duolingo.com/comments/*/love",
Expand Down

0 comments on commit 1c52726

Please sign in to comment.