CiteWikiLinker
DescriptionWikilinks publishers in {{Cite web}} and {{Cite news}} citation templates
Author(s)DaxServer
StatusAlpha
First releasedFebruary 24, 2022; 2 years ago (2022-02-24)
UpdatedFebruary 26, 2022; 2 years ago (2022-02-26)
BrowsersBrave, Google Chrome, Firefox
SkinsVector
SourceUser:DaxServer/CiteWikiLinker.js

The script will help in wikilinking publisher of the cited website. It will add a "Cite WikiLinker" portlet link in Visual Editor's source mode editing. This currently is limited to {{Cite web}} and {{Cite news}}. Care must be taken to follow the guidelines around citing sources and verify changes made before publishing; you shall take full responsibility for your edits using the script.

Perennially incomplete

edit

The script aims to cover major websites that are used in [English] Wikipedia. Due to the nature of near infinite websites that we could use to source, it is impossible to add all of them. As such, this script will never satisfy anyone completely.

Installation instructions

edit

Hint: It's much easier if you get ScriptInstaller, then navigate to User:DaxServer/CiteWikiLinker.js and click "Install" at the top.

However, here's the manual method:

  1. Place {{subst:iusc|User:DaxServer/CiteWikiLinker.js}} on Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js.
  2. Clear your cache and enjoy!

Personalization

edit

One can leave me a message to add the missing entries; or add a window.ds_citewikilinker_regexes parameter in their common.js file. The format is as follows:

window.ds_citewikilinker_regexes = [
    ['www\.thehindu\.com', 'The Hindu'],
    ['www\.telegraphindia\.com', 'The Telegraph', 'The Telegraph (India)|The Telegraph'],
    ['www\.telegraphindia\.com', 'www\.telegraphindia\.com', 'The Telegraph (India)|The Telegraph'],
    ['movies\.yahoo\.com', 'Yahoo! Movies'],
]
  1. The main ds_citewikilinker_regexes is an array of entries
  2. Each entry itself is an array, either 2 or 3 elements
    1. The first [mandatory] element is the domain from the url. Some websites use www sub-domain (example #1) and some doesn't (example #4). http(s):// is omitted.
    2. The second [mandatory] element is the publisher of the website. It is the |website= or |work= or |newspaper= or |publisher= field in the citation templates. The wikilink syntax ([[ and ]]) are omitted. See example #1
    3. The third [optional] element is useful when the second element is not the Wikipedia article name, but something else, like a disambiguated page, website domain name or a typo [due to editors' overlook, among other reasons]. This will be set in the above said parameter fields. See examples #2 and #3.