User:Opencooper/wikidataDescription

wikidataDescription.js displays the current article's description in Wikidata. This brings it in parity with the mobile site and apps. Additionally, clicking the description shows additional information such as a short description, if found. If the article does not have an associated Wikidata item, it will show "[No Wikidata]", and if the description is empty, "[No desc.]".

Installation

edit

To install the script, add the following to your common.js page:

importScript('User:Opencooper/wikidataDescription.js'); // Backlink: [[User:Opencooper/wikidataDescription.js]]

Styling

edit

To change the look of the descriptions with CSS, target the #wikidataDescription and #shortDescriptionInfo ids in your common.css page. For example, to hide the "[short description]" shown after short descriptions:

#shortDescriptionInfo small {
	display: none;
}

License

edit

This script and any associated files are licensed under Creative Commons Zero.