Fix calendar parsing for new MyUW Vue schedule cards #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MyUW recently went through a restructure, where many components including the schedule card became Vue components. This breaks this extension, as it can no longer read the calendar data, or place the icon to begin with.
This PR allows for the extension to be invoked by adding the icon back to the card, as well as fixes the ability to parse the schedule data.
Instead of hijacking the card's render handler, a timer is used to periodically check if the card has rendered before adding the icon. Perhaps this does not feel like the best solution.
The structure of the schedule data when pulled from the Vue store seems to be a little different, but it appears to work.
Existing Behavior
Icon is not added to the card due to an error.
Proposed Behavior