User talk:V111P/js/webRef.js

From Wikipedia, the free encyclopedia

Untitled 2017

Hi, I just wanted to say that I loooooove this bookmarklet. Very handy and I use it a lot. I love how it "flies out" in the textarea editing section so I can manually type in or adjust some parameters that the scripts couldn't identify. Not a big deal, but one feature suggestion is to add a "Copy" button that will copy the text to the clipboard, but I'm not sure if that is possible (I know that sometimes clipboard-access is not possible because of security reasons...). THANK YOU

Thanks for writing, Darrylhopkins. I replaced the Select button with a Copy buttons in the browsers that support it. --V111P (talk) 11:47, 10 November 2017 (UTC)

Italian version

Thanks for the script, I have localized it in Italian. https://it.wikipedia.org/wiki/Utente:Rollopack/js/webRefjs

--Rollopack (talk) 07:55, 27 December 2018 (UTC)

Interface-protected edit request on 16 March 2026

For date's autoSearchIn, currently ['meta-i datePublished', 'meta date', 'meta Date']

Please add: 'meta-p article:published_time', 'meta article:published_time' and 'meta DC.date.issued' 1Veertje (talk) 17:03, 16 March 2026 (UTC)

 Done Izno (talk) 20:52, 16 March 2026 (UTC)
thanks 1Veertje (talk) 12:54, 17 March 2026 (UTC)

Interface-protected edit request on 16 March 2026 (2)

Please change the refDocData to this more comprehensive list

var refDocData = window.webRef.refDocData = {
	things: {
		title: {
			autoSearchIn: [
				'meta-i headline',
				'meta-p og:title',
				'meta-p twitter:title',
				'meta citation_title',
				'meta DC.title',
				'meta dc.title',
				'meta title',
				'title',
				'h1'
			]
		},
		date: {
			formatter: dateFormatter,
			autoSearchIn: [
				'meta-i datePublished',
				'meta-p article:published_time',
				'meta article:published_time',
				'meta citation_publication_date',
				'meta DC.date.issued',
				'meta-i dateCreated',
				'meta citation_date',
				'meta citation_online_date',
				'meta DC.date',
				'meta dc.date',
				'meta publish_date',
				'meta pubdate',
				'meta-i dateModified',
				'meta date',
				'meta Date'
			]
		},
		author: {
			formatter: nameFormatter,
			autoSearchIn: [
				'meta-i author',
				'meta-p article:author',
				'meta citation_author',
				'meta DC.creator',
				'meta dc.creator',
				'meta-p og:author',
				'meta-p twitter:creator',
				'meta author',
				'meta Author',
				'meta-p article:author_name'
			]
		},
		siteName: { // the site domain is also used
			autoSearchIn: [
				'meta-p og:site_name',
				'meta parsely-site',
				'meta application-name',
				'meta citation_journal_title',
				'meta-p twitter:site'
			]
		},
		lang: {
			formatter: function (langCode) { // remove language variant
				return langCode.replace(/([^-_]{2,3})[-_].+/, '$1');
			},
			autoSearchIn: [
				'meta-i inLanguage',
				'meta citation_language',
				'meta-p og:locale',
				'meta DC.language',
				'meta dc.language',
				'meta language',
				'misc html-lang'
			]
		},
		publisher: {
			autoSearchIn: [
				'meta-i publisher',
				'meta citation_publisher',
				'meta DC.publisher',
				'meta dc.publisher',
				'meta publisher',
				'meta-p article:publisher'
			]
		},
		authorName: {},
		authorWikiArticle: {},
		notAnAuthor: {}
	} // things end
};

Also please change

var dateFormatDefault = dateFormatDMY

Into

var dateFormatDefault = dateFormatYMD

This would make the default output easier to reuse across non-English Wikipedias, and it also aligns better with existing citation tooling, which already emits ISO-style dates. Sorry about the double request 1Veertje (talk) 07:50, 17 March 2026 (UTC)

 Done Izno (talk) 16:56, 17 March 2026 (UTC)
Could you also change the default date format to YMD? The preferrablilty of this configuration was discussed on this talk page. This aligns the output with ISO-style dates used by other citation tools and makes it easier to reuse across projects (formatting can be handled locally by templates such as {{Use dmy dates}} / {{Use mdy dates}}).
I've also slightly pruned overlapping metatags in refDocData (publisher vs siteName) to avoid duplicate values. 1Veertje (talk) 12:10, 19 March 2026 (UTC)

Related Articles

Wikiwand AI