Skip to content

Conversation

@koudaiii
Copy link
Owner

@koudaiii koudaiii commented Apr 12, 2025

Why

This extension hasn’t been working recently.

What

Recently, learn.microsoft.com switched from using the data-article-date to local-time. Since this extension was retrieving dates from data-article-date, it stopped functioning. Therefore, we will update it to extract the dates from local-time.

This pull request includes changes to update the selector for date elements from time[data-article-date] to local-time in both the source code and the end-to-end tests. The most important changes include updating the selector in the src/content.js file and modifying the E2E test in tests/e2e/content.e2e.test.js.

Updates to date element selector:

  • src/content.js: Changed the selector from time[data-article-date] to local-time in the dataArticleDateElement query and in the englishDateStr query. [1] [2]

Modifications to E2E tests:

Manual Test

image

image

image

@koudaiii koudaiii changed the title [WIP] [WIP] Switched from the data-article-date Element to Using the local-time Tag Apr 12, 2025
@koudaiii
Copy link
Owner Author

And as an observation from this update effort, tests that used to finish in about one minute are no longer completing in that time. 🤔

    thrown: "Exceeded timeout of 20000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

@koudaiii koudaiii changed the title [WIP] Switched from the data-article-date Element to Using the local-time Tag Switched from the data-article-date Element to Using the local-time Tag Apr 14, 2025
@koudaiii koudaiii merged commit 1ef160b into main Apr 14, 2025
3 checks passed
@koudaiii koudaiii deleted the koudaiii/fix-does-not-work branch April 14, 2025 06:38
@koudaiii koudaiii mentioned this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants