Content deleted Content added
Make changes to comments. |
sync from User:SD0001/comments in local time.js - requested on talk Tag: Reverted |
||
Line 1:
// Forked from [[User:Gary/comments in local time.js]]
/**
* COMMENTS IN LOCAL TIME
Line 9 ⟶ 10:
* [[Wikipedia:Comments in Local Time]]
*/
mw.hook('wikipage.content').add(($content) => {
/**
* Given a number, add a leading zero if necessary, so that the final number
Line 503 ⟶ 504:
if (isDisabledUrl) {
return;▼
}▼
// If this content already contains localcomments class, it was
// already worked on.
return;
}
this.replaceText(
$content[0],
▲ document.querySelector('.mw-parser-output'),
/(\d{1,2}):(\d{2}), (\d{1,2}) ([A-Z][a-z]+) (\d{4}) \(UTC\)/
);
Line 618 ⟶ 625:
}
▲ return;
▲ }
▲ const commentsInLocalTime = new CommentsInLocalTime();
});
|