User:Bargioni/PrefRank

From Wikidata
Jump to navigation Jump to search

PrefRank is a gadget to help you set one value as preferred if two or more values with normal rank are present for one of the following properties: date of birth (P569), place of birth (P19), date of death (P570), place of death (P20) (since all these properties have the single-best-value constraint (Q52060874)).

Install it adding

importScript( 'User:Bargioni/PrefRank_default_config.js' );
importScript( 'User:Bargioni/PrefRank.js' );

to your common.js file.

The default configuration can be substituted by a personal configuration. Look at User:Bargioni/PrefRank config.js for an example.
Using another config will allow you to change properties involved in the gadget, colors and especially the position of the PrefRank icon. The default icon is
https://upload.wikimedia.org/wikipedia/commons/0/04/Starred_checkmark_big_star_with_mark_on_top.svg
and the alternate icon is the Normal rank itself, with an added border color.

The gadget works in English (default), Italian or Spanish.
Translating strings and forking the default config will also allow to use the gadget in other languages.

In order to set one value as preferred, click on the PrefRank icon and select the reason because of which you are setting the value as preferred, then click OK to confirm the edit; reload the page to see the value edited.