File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const timeAgoLabels = {
3636
3737 const debug = new URLSearchParams ( window . location . search ) . get ( "jp-learn-microsoft-com-update-checker-debug" ) ;
3838
39- // Get data-article-date element in current page
40- const dataArticleDateElement = document . querySelector ( 'time[data-article-date] ' ) ;
39+ // Get local-time tag in current page
40+ const dataArticleDateElement = document . querySelector ( 'local-time ' ) ;
4141 if ( ! dataArticleDateElement ) return ;
4242
4343 // Parse article date
@@ -56,7 +56,7 @@ const timeAgoLabels = {
5656 const parser = new DOMParser ( ) ;
5757 const doc = parser . parseFromString ( data , "text/html" ) ;
5858
59- const englishDateStr = doc . querySelector ( 'time[data-article-date] ' ) ?. getAttribute ( "datetime" ) ;
59+ const englishDateStr = doc . querySelector ( 'local-time ' ) ?. getAttribute ( "datetime" ) ;
6060 if ( ! englishDateStr ) return ;
6161 const englishDate = new Date ( englishDateStr ) ;
6262
You can’t perform that action at this time.
0 commit comments