MediaWiki talk:Gadget-ReferenceTooltips.js: Difference between revisions

Content deleted Content added
MtMNC (talk | contribs)
Line 182:
:The structure of the surrounding code context appears to be substantially different in enwiki's version of this script; I'm not sure it would be a straightforward cut-and-paste. [[User:Writ Keeper|Writ Keeper]] [[User Talk: Writ Keeper|⚇]][[Special:Contributions/Writ_Keeper|♔]] 14:54, 2 July 2019 (UTC)
::{{not done}} this would need to be thoroughly tested here first, feel free to mock it up as a user script here on wiki and gain some testers. — [[User:Xaosflux|<span style="color:#FF9933; font-weight:bold; font-family:monotype;">xaosflux</span>]] <sup>[[User talk:Xaosflux|<span style="color:#009933;">Talk</span>]]</sup> 19:50, 15 July 2019 (UTC)
 
== Feature suggestion: support for book references ==
 
The Cite extension has an experimental feature called [[mw:Help:Cite#book referencing|book referencing]]. This feature allows editors to cite multiple parts of an already-cited source using the <code>extends</code> attribute. For instance, an editor could cite a book with the citation <code><nowiki><ref name="Miller">E. Miller, ''The Sun'', (New York: Academic Press, 2005)</ref></nowiki></code>, and then they could cite page 42 in that book with a second citation <code><nowiki><ref extends="Miller">p. 42</ref></nowiki></code>.
 
Continuing with the earlier example, currently when a user hovers over the "p. 42" sub-citation, the tooltip will just contain "p. 42" without the book name. That tooltip is not especially useful. It would be nice if this gadget could handle "book references" more naturally. That is, if a user hovers over a citation of the form <code><nowiki><ref name="child" extends="parent">text</ref></nowiki></code> attribute, it would be nice if the tooltip displayed the contents of both the <code>parent</code> and <code>child</code> citations. Note that book citations can only go one level deep (you cannot extend a citation that extends another citation), which should make the implementation more straightforward. Thank you for considering this suggestion! [[User:MtMNC|MtMNC]] ([[User talk:MtMNC|talk]]) 06:51, 2 November 2020 (UTC)