Reference Tooltips/zh



当鼠标指针悬停在脚注上时，小工具参考文献提示工具能够直接显示出脚注的内容. 用户不必向下滚动页面，提示内容将直接显示在该正文行中.

本功能在很多wiki上默认启用，用户可以通过本功能的选项菜单关闭这个小工具（这将设置一个cookie）；已登录的用户可以在“特殊:参数设置”页面的小工具选项卡中永久关闭它.

简介
本工具最初由User:Yair rand在2012年开发，并由User:Jack who built the house在2019年修改. 要在您的wiki上安装该小工具，请添加下列文件并进行以下操作：


 * w:MediaWiki:Gadget-ReferenceTooltips.js
 * Replace  with the appropriate URL for your own wiki (as of 27 April 2020, this is around line 479); failing to do so may cause an exception in the JavaScript console, and the tooltips will fail to show up
 * w:MediaWiki:Gadget-ReferenceTooltips.css
 * Add the line "ReferenceTooltips[ResourceLoader|default|type=general]|ReferenceTooltips.js|ReferenceTooltips.css" to MediaWiki:Gadgets-definition
 * Create a description for the gadget to be displayed in the user preferences by editing MediaWiki:Gadget-ReferenceTooltips on your wiki; copy-paste the content from w:MediaWiki:Gadget-ReferenceTooltips, or create your own if you wish

此时，该小工具已被添加且默认被载入.

小工具的正常工作依赖于：mediawiki.cookie、jquery.client. 也必须一同加载.

原理
当前，Wikimedia站点将所有参考文献列于文章底部. 对于长页面，特别是那些有很多参考文献的页面，这种方式并不理想. Checking an article's references requires several traversals over the entire length of the article, during which time the reader will often lose their place.

Hypotheses
This is a general usability feature. It is hypothesized that readers will be more likely to visit references if they are immediately accessible without having to traverse the entire page length.

Current workflow
In articles, a statement is referenced with a super-scripted, internal page link. Clicking on this link will take the user to the bottom of the page to the whole reference list. The specific reference is then highlighted. The user then clicks the link there and the referenced external link is opened.

User experience
When the user hovers their mouse over the super-scripted citation link in an article, a tooltip appears above that includes the reference footnote. The user can then move their mouse into the hover and click on the link(s) there to open the external references.

Clicking on the super-scripted reference link behaves as normal (the user is brought to the reference list).

JavaScript and tablet considerations
This feature requires JavaScript. Browsers with JavaScript disabled will not have this feature.

This feature may not be usable with tablets and other touch screen interfaces without eliminating the current "click takes you to the reference list" behavior.

Settings
To edit this gadget's settings, hover over a citation so that the tooltip appears, then click on the gear icon. You can set the following options:


 * Whether the tooltip appears on hover or on click
 * Delay before the tooltip appears (by default 200 milliseconds)
 * Whether to show a tooltip for abbreviations inside tags. (Example: "abbr. ")