1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

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)