diff --git a/README.md b/README.md index ee3b278..0974a19 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - [Download Extension](https://chrome.google.com/webstore/detail/canvas-strikethrough/cnohgbfhedbjkglpkfbjhiikjemcjhng) ### What is it? -__Canvas Strikethrough__ is a *Chrome Extension* that allows users to mark any event on the Canvas calendar as complete. This is useful for students who want to keep track of what assignments they have completed when their instructor does not require them to submit their work through Canvas. +__Canvas Strikethrough__ is a *Chrome Extension* that allows users to mark any event on the Canvas calendar as complete. This is useful for students who want to stay more organized and keep track of which assignments they have completed when their instructor does not require them to submit their work through Canvas. ### How does it work? After installing the extension, either visit the Canvas calendar, or go to a assignment/page of your choice. You will then see a new option to mark that assignment as complete. @@ -20,7 +20,7 @@ After installing the extension, either visit the Canvas calendar, or go to a ass #### Allowed Canvas Domains Instructions on how to add your own university's Canvas domain will be added in the future. For now, if you would like to add your own domain, please open an issue on GitHub. -- `*.instructure.com` +- `*.instructure.com` *(Any Canvas URL that ends in .instructure.com)* - `canvas.wpi.edu` - `canvas.olin.edu` - `canvas.calpoly.edu` diff --git a/src/content.ts b/src/content.ts index c033d64..73ff216 100644 --- a/src/content.ts +++ b/src/content.ts @@ -24,7 +24,7 @@ export async function calendar() { const { name, element } = event; // If assignment is checked - if (checkedTodos.find((todo: Todo) => todo.name === name)) { + if (checkedTodos.find((todo: Todo) => todo.name.trim() === name.trim())) { checkEvent(element); } }); diff --git a/src/getCalendarEvents.ts b/src/getCalendarEvents.ts index 514325e..121d9d4 100644 --- a/src/getCalendarEvents.ts +++ b/src/getCalendarEvents.ts @@ -14,7 +14,7 @@ export function getCalendarEvents(): CalendarEvent[] { let eventTitle = eventElement.children[0].getAttribute('title'); // Convert encoded characters to normal characters - eventTitle = decodeEntities(eventTitle); + eventTitle = decodeEntities(eventTitle)?.trim(); return { name: eventTitle,