User talk:Samwilson/CiteTool.js
Jump to navigation
Jump to search
Looking at User:Premeditated/CiteTool.js, the only difference seems to be the addition of this author name string (P2093) support:
if ( key === 'author' ) {
for ( var author of val ) {
lv.addItem( self.getStringValueSnak( 'P2093', author.join(' ') ) );
addedSnakItem = true;
}
return;
}
Is that something we could upstream? @Samwilson, Premeditated: Jean-Fred (talk) 13:08, 27 October 2022 (UTC)
- @Jean-Frédéric, Premeditated: Definitely! This is a good idea, I'll add it in here. Sam Wilson 05:55, 30 October 2022 (UTC)
- @Jean-Frédéric, Premeditated: Done! See what you think. Sam Wilson 07:18, 30 October 2022 (UTC)
- @Samwilson: Nice, I will also recommend to add a
.trim()
for the string. As sometimes there are some unfortunate spaces from the API data. - Premeditated (talk) 08:31, 1 November 2022 (UTC)- @Premeditated: Ah, good point. You mean for the individual author components? e.g. it should be
? Sam Wilson 08:49, 1 November 2022 (UTC)author.map( function( a ){ return a.trim(); } ).join( ' ' );
- @Premeditated: Ah, good point. You mean for the individual author components? e.g. it should be
- @Samwilson: Nice, I will also recommend to add a
- There is now, thanks to User:Nikki, the gadget MediaWiki:Gadget-CiteTool.js. Jean-Fred (talk) 13:05, 23 December 2022 (UTC)
- @Jean-Frédéric, Premeditated: Done! See what you think. Sam Wilson 07:18, 30 October 2022 (UTC)