Skip to content

Commit 1c52726

Browse files
committed
Fixed bug where script would not be injected on forum pages with a non 8 digit id & console logs showing 1 less than sent
1 parent e8b05f6 commit 1c52726

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const postLinkRegEx = /^https:\/\/forum.duolingo.com\/comment\/[0-9]{8}/g;
1+
const postLinkRegEx = /^https:\/\/forum.duolingo.com\/comment\/[0-9]+/g;
22

33
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
44
if (changeInfo.status == "complete" && tab.url.match(postLinkRegEx)) {

injected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ chrome.runtime.onMessage.addListener(async (request) => {
9090
credentials: "include"
9191
}
9292
);
93-
console.log(`Gave lingot ${i}/${count}.`);
93+
console.log(`Gave lingot ${i+1}/${count}.`);
9494
}
9595
}
9696
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Giving Duo",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"permissions": [
55
"https://forum.duolingo.com/comment/*",
66
"https://forum-api.duolingo.com/comments/*/love",

0 commit comments

Comments
 (0)