Skip to content

Commit

Permalink
Fixed certain events not being marked in calendar
Browse files Browse the repository at this point in the history
- Updated README.md
- Fixed certain events not being marked off on the calendar
  • Loading branch information
da-stoi committed Nov 16, 2023
1 parent 2e7180a commit ca28f8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/getCalendarEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ca28f8d

Please sign in to comment.