Jump to content

User:Saroj/AddSitelink

From Wikiquote, the free quote compendium

AddSitelink is a gadget that adds a sitelink from the current page to an existing Wikidata item, using a corresponding Wikipedia article as the reference. It adds an "Add sitelink" link to the Tools menu when viewing a page without a Wikidata item; entering a Wikipedia language and title finds the linked item and adds a sitelink to it. The article title field is prefilled with the current page's title and autocompletes against the selected Wikipedia edition. If the item already has a conflicting sitelink on this wiki, the gadget shows a warning and disables adding until the conflict is resolved on Wikidata.

Import

[edit]

To import AddSitelink, add the following JavaScript to your common.js:

importScript('User:Saroj/AddSitelink.js'); // Backlink: [[User:Saroj/AddSitelink.js]]

Usage

[edit]
  1. While viewing a main-namespace page with no Wikidata item, click Add sitelink in the Tools menu.
  2. Confirm or change the Wikipedia language code (e.g. en) and article title.
  3. Click Check to look up the Wikidata item, then review the item shown.
  4. Click Add. If the item already has a conflicting sitelink on this wiki, the button is disabled — resolve the conflict on Wikidata directly before retrying.