Gebruiker:Naudefj/common.js
Let wel: Na die wysiging is dit dalk nodig om u blaaier se kasgeheue te verfris voordat u die veranderinge sal sien:
- Firefox / Safari: hou Shift en kliek Herlaai, of druk Ctrl-F5 of Ctrl-R (⌘-R op 'n Mac)
- Google Chrome: Druk Ctrl-Shift-R (⌘-Shift-R op 'n Mac)
- Internet Explorer / Edge: Hou Ctrl en kliek Refresh, of druk Ctrl-F5
- Opera: Gaan na Kieslys → Settings (Opera → Preferences op 'n Mac) en dan na Privacy & security → Clear browsing data → Cached images and files.
// Auto-Formatter - https://meta.wikimedia.org/wiki/User:TMg/autoFormatter
// mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript');
mw.loader.load("//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js/Beta.js&action=raw&ctype=text/javascript");
var autoFormatLocalisation = true;
var autoFormatShortYearRanges = false; // 2001–02 -> 2001–2002
var autoFormatMaskedLinks = false; // E.g. [[New York|New York City]] -> [[New York]] City
var autoFormatReplacements = [
[/\[\[([^:\]\,]+)([,;])\]\]/g, '[[$1]]$2'], // [[Pretoria,]] -> [[Pretoria]],
[/^[•.]\s+/m, '* '], // • -> *
[/:/g, ':'], // HTML-entitiete
[/ /g, ' '],
[/&/g, '&'],
[/([^'])[′`´‘]n /g, '$1\'n '], // egte ortografie vir 'n (’n is nauurlik ook reg)
[/ʼn /g, '\’n '], // faseer uit, http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[:Deprecated=Yes:]
[/([^gs'"\|(\[\s])'n/, '$1 \'n'], // g'n en s'n is reg, maar andersinds moet ons 'n spasie insit
[/(\[\[| )(1|8|20|101)de/, '$1$2ste'], // Rangtelwoorde - 'de' en 'ste'
[/(1|8|20|101)<sup>de<\/sup>/, '$1<sup>ste</sup>'],
['(Engels)', '{{en}}'],
['(Duits)', '{{de}}'],
['(Frans)', '{{fr}}'],
['(Spaans)', '{{es}}'],
[/ duits/, ' Duits'],
[/Suid\s*Afrika/i, 'Suid-Afrika'],
[/huidiglik/i, 'tans'],
[/aanbetref/i, 'betref'],
[/onverskoning/i, 'om verskoning'],
[/aantuiging/i, 'aantyging'],
// [/China/, 'Sjina'],
// [/Chinese/, 'Sjinese'],
[/in ander woorde/i, 'met ander woorde'],
// [/voorkeur in/i, 'voorkeur vir'],
// [/afkeer in/i, 'afkeer van'],
// ['offisiële', 'amptelike'],
// ['vervang met', 'vervang deur'],
['See also', 'Sien ook'],
['External links', 'Eksterne skakels'],
[/(^|\[\[)Beeld:/i, '$1Lêer:'],
[/(^|\[\[)File:/i, '$1Lêer:'],
[/(^|\[\[)Image:/i, '$1Lêer:'],
[/(^|\[\[)Bestand:/i, '$1Lêer:'],
['|thumb', '|duimnael'],
['|thumbnail', '|duimnael'],
['|left', '|links'],
['|right', '|regs'],
['|none', '|geen'],
['|center', '|senter'],
['|framed', '|omraam'],
['|frameless', '|raamloos'],
[/\[\[Template:/i, '[[Sjabloon:'],
[/\{\{Sjabloon:/i, '{{'],
[/\[\[Help:/i, '[[Hulp:'],
[/, Besoek op/, ', besoek op'],
[/<references \/>/i, '{{Verwysings}}'],
[/{{verwysings/i, '{{Verwysings'],
[/{{reflist/i, '{{Verwysings'],
[/<hr>/i, '<hr />'],
[/<references\s+\/>/i, '{{Verwysings'],
[/{{stub/i, '{{Saadjie'],
[/{{saadjie/i, '{{Saadjie'],
[/\[\[Kategorie\:Saadjies\]\]/i, '{{Saadjie}}'], // WERK NIE
[/Kategorie\:Saadjies/i, '{{Saadjie}}'], // Die een?
[/{{commons/i, '{{Commons'],
[/{{dubbelsinnig/i, '{{Dubbelsinnig'],
[/\[\[Kategorie:Dubbelsinnig\]\]/i, '{{Dubbelsinnig}}'], // WERK NIE
[/{{smaller\|/i, '{{Kleiner|'],
[/{{Taxobox/i, '{{Taksoboks'],
[/{{Dead link\|/i, '{{Dooie skakel|'],
[/{{Main\|/i, '{{Hoofartikel|'],
[/{{Fossil range\|/i, '{{Fossiel tydperk|'],
[/\[\[Plant\]\]ae/, '[[Plantae]]'],
[/\[\[Animal\]\]ia/, '[[Animalia]]'],
[/\[\[Arthropod\]\]a/, '[[Arthropoda]]'],
[/\[\[Insect\]\]a/, '[[Insecta]]'],
[/\[\[Mammal\]\]ia/i, '[[Mammalia]]'],
[/\[\[bird\|Aves\]\]/i, '[[Aves]]'],
[/\[\[Chordate\|Chordata\]\]/i, '[[Chordata]]'],
[/{{Birth date\|/i, '{{Geboortedatum|'],
[/{{Birth date and age\|/i, '{{Geboortedatum en ouderdom|'],
[/{{Death date and age\|/i, '{{Sterfdatum en ouderdom|'],
[/{{Coord\|/i, '{{Koördinate|'],
[/{{Aut\|/i, '{{Outeur|'],
[/display=inline,title/i, 'aansig=inlyn,titel'], // Langste een eerste
[/display=title/i, 'aansig=titel'],
[/display=inline/i, 'aansig=inlyn'],
[/koördinaatwys\s*=\s*\n/i, 'koördinaatwys=aansig=inlyn,titel\n'],
[/{{Commons category/i, '{{Commonskat'],
[/{{wikispecies/i, '{{Wikispecies'],
[/prettytable/i, 'wikitable'],
[/{{DISPLAYTITLE:/i, '{{TITELAANSIG|'],
[/#REDIRECT \[\[/i, '#AANSTUUR [['],
[/\|\{\{PAGENAME\}\}/i, ''],
[/\{\{PAGENAME\}\}/i, '\{\{subst:PAGENAME\}\}'],
[/\[\[ *([CcKk]ategor[iy]e?)\s*:\s*([^[\]|]*[^\s[\]|])\s*(?=[\]|])/gi, '[[Kategorie:$2'],
[/(\[\[\d{1,2} \w+\]\]) (\d{4})/g, '$1 [[$2]]'], // Maak jaarskakel reg
[/(\n[*#:;]+) *([^\s*#:;])/g, '$1 $2'], // Spasiëring
[/(\s*<\s*ref[^>\/]*\/\s*>|\s*<\s*ref\s*[^\/\\]*\s*>[^<]*<\/ref>)[ \t]*([\,\.\?\:\;]|\][^\]]|\}[^\}])/igm, '$2$1'],
[/\{\{Link (.*)\|(.*)\}\}/i, ''], // Link GA/FL now handled in wikidata
[/{{font color\|/i, '{{Kleur|'],
[/<span style="color:([#\w]+);">([^<]+)<\/span>/i, '{{Kleur|$1|$2}}'],
[/<font style="color:([#\w]+);">([^<]+)<\/font>/i, '{{Kleur|$1|$2}}'],
[/<span style="size:([-+%\w]+);">([^<]+)<\/span>/i, '{{Teksgrootte|$1|$2}}'],
[/<font style="size:([-+%\w]+);">([^<]+)<\/font>/i, '{{Teksgrootte|$1|$2}}'],
[/<span style="background-color:([-+%\w]+);">([^<]+)<\/span>/i, '{{Agtergrondkleur|$1|$2}}'],
[/<font size="?-2"?>([^<]+)<\/font>/i, '{{Teksgrootte|x-small|$1}}'],
[/<font size="?-1"?>([^<]+)<\/font>/i, '{{Teksgrootte|small|$1}}'],
[/<font size="?\+1"?>([^<]+)<\/font>/i, '{{Teksgrootte|large|$1}}'],
[/<font size="?\+2"?>([^<]+)<\/font>/i, '{{Teksgrootte|x-large|$1}}'],
// Afrikaanse sjabloon moet Afrikaanse parametername hê!
[/{{Webaanhaling([^}]*)\|title=([^}]+)}}/i, '{{Webaanhaling$1|titel=$2}}'],
[/{{Webaanhaling([^}]*)\|first=([^}]+)}}/i, '{{Webaanhaling$1|eerste=$2}}'],
[/{{Webaanhaling([^}]*)\|last=([^}]+)}}/i, '{{Webaanhaling$1|laaste=$2}}'],
[/{{Webaanhaling([^}]*)\|publisher=([^}]+)}}/i, '{{Webaanhaling$1|uitgewer=$2}}'],
[/{{Webaanhaling([^}]*)\|accessdate=([^}]+)}}/i, '{{Webaanhaling$1|toegangsdatum=$2}}'],
[/{{Webaanhaling([^}]*)\|quote=([^}]+)}}/i, '{{Webaanhaling$1|aanhaling=$2}}'],
[/{{Webaanhaling([^}]*)\|work=([^}]+)}}/i, '{{Webaanhaling$1|werk=$2}}'],
[/{{Webaanhaling([^}]*)\|author=([^}]+)}}/i, '{{Webaanhaling$1|outeur=$2}}'],
[/{{Feit\|date=/i, '{{Feit|datum='],
// [[:en:Special:BookSources/0877251665|ISBN 0-87725-166-5]]
[/\[\[:[a-z]{2}:Special:BookSources\/(\d+)\|ISBN ([^\]]+)\]\]/i, 'ISBN $1'],
[/\[\[ISBN\]\] (\d+)/i, 'ISBN $1'],
// WERK NIE: Onnodige nowiki-etikette soos <nowiki>http://www.imdb.com/name/nm4975964/</nowiki>
// [/<nowiki[^>]*>([http|PMID][^<]+)<\/nowiki[^>]*>/i, '$1'],
[/<nowiki[^>]*>(PMID [^<]+)<\/nowiki[^>]*>/i, '$1'],
[/<nowiki[^>]*\/>/i, ''], // Onnodige <nowiki />
[/\[\[[^\]]*\|\]\]/i, ''], // Leë wikiskakels
[/<cite class=[^>]*>([^<]*)<\/cite>/i, '$1'], // Oorbodige cite-etikette
// Tydelike wysigings om Afriforum se artikels skoon te maak.
['==== Boeke ====', '=== Boeke ==='],
['==== Tydskrifte en koerante ====', '=== Tydskrifte en koerante ==='],
['==== Internet ====', '=== Internet ==='],
['==== Ongepubliseerde dokumente ====', '=== Ongepubliseerde dokumente ==='],
['==== Resensies ====', '=== Resensies ==='],
[' contenteditable="false"', ''],
];
// ClearDiff: https://de.wikipedia.org/wiki/Benutzer:TMg/cleanDiff
var cleanDiffLinkLimit = 1200;
mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/cleanDiff.js&action=raw&ctype=text/javascript');
// findargdups - https://en.wikipedia.org/wiki/User:Frietjes/findargdups
// mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Frietjes/findargdups.js&action=raw&ctype=text/javascript");
// reFill - https://en.wikipedia.org/wiki/User:Zhaofeng_Li/reFill
// mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );