User:DaxServer/CiteWikiLinker

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
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.

Personalization
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:


 * 1) The main ds_citewikilinker_regexes is an array of entries
 * 2) Each entry itself is an array, either 2 or 3 elements
 * 3) 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.
 * 4) 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
 * 5) 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.