Chú thích nổi

This page is a translated version of the page Reference Tooltips and the translation is 23% complete.
Outdated translations are marked like this.

Chú thích nổi là một tiện ích hiển thị ghi chú khi bạn di chuột qua chúng.

Một Chú thích nổi; con trỏ hình bàn tay đang di chuột qua liên kết chú thích. Chú thích nổi hiển thị nội dung chú thích mà không cần nhấp chuột, hoặc thậm chí cuộn xuống chú thích.

Một gợi ý xuất hiện ngay trên dòng mà không cần phải cuộn xuống trang.

Tính năng này được bật theo mặc định trên nhiều wiki và người dùng có thể tắt nó bằng cách truy cập Tiện ích trong tùy chọn,người dùng đã đăng nhập có thể vô hiệu hóa nó vĩnh viễn

Giới thiệu

Đoạn mã ban đầu được phát triển bởi User:Yair rand vào năm 2012 và được làm lại bởi User:Jack who built the house vào năm 2019. Để cài đặt tiện ích vào wiki của bạn, bạn cần chuyển các tệp sau vào đó

  • w:MediaWiki:Gadget-ReferenceTooltips.js
    • Replace https://en.wikipedia.org/w/load.php 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|dependencies=mediawiki.cookie,jquery.client]|ReferenceTooltips.js|ReferenceTooltips.css to MediaWiki:Gadgets-definition
     
    Menu tùy chọn
  • 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

Tiện ích sau đó sẽ được tải theo mặc định trên wiki.

For the normal functioning of the script, the following dependencies are necessary: mediawiki.cookie, jquery.client. Extension:Gadgets must also be loaded.

Rationale

Currently, Wikimedia sites list all references at the bottom of the article. For large articles, especially those with many references, this is sub-optimal. 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 ‎<abbr> tags. (Example: "abbr.")

See also