Add isodate as available placeholder for auto-comment

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3265
This commit is contained in:
Raymond Hill 2024-06-07 08:52:30 -04:00
parent 6075dbb131
commit d5208ee5dd
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -607,6 +607,7 @@ onBroadcast(msg => {
const url = new URL(options.docURL);
comment = '! ' +
this.hiddenSettings.autoCommentFilterTemplate
.replace('{{isodate}}', d.toISOString().split('T')[0])
.replace('{{date}}', d.toLocaleDateString(undefined, { dateStyle: 'medium' }))
.replace('{{time}}', d.toLocaleTimeString())
.replace('{{hostname}}', url.hostname)