Switched from the data-article-date Element to Using the local-time Tag #43
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.
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]tolocal-timein both the source code and the end-to-end tests. The most important changes include updating the selector in thesrc/content.jsfile and modifying the E2E test intests/e2e/content.e2e.test.js.Updates to date element selector:
src/content.js: Changed the selector fromtime[data-article-date]tolocal-timein thedataArticleDateElementquery and in theenglishDateStrquery. [1] [2]Modifications to E2E tests:
tests/e2e/content.e2e.test.js: Updated the selector in the E2E test to wait for thelocal-timeelement instead oftime[data-article-date].Manual Test