/**
 * 
 * 
 **/
mw.loader.load('//ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');         // [[File:Krinkle_RTRC.js]]
mw.loader.load('//www.wikidata.org/w/index.php?title=User:Yair rand/WikidataInfo.js&action=raw&ctype=text/javascript'); // [[d:User:Yair rand/WikidataInfo.js]]
mw.loader.load( '/w/index.php?title=Bruger:Cgt/patrollinks.js&action=raw&ctype=text/javascript' ); 
mw.loader.load( '/w/index.php?title=Bruger:Rodejong/markeer.js&action=raw&ctype=text/javascript' ); 
mw.loader.load( '/w/index.php?title=Bruger:Rodejong/duplinks.js&action=raw&ctype=text/javascript' );        // Highlights links that occur more than once in an article
mw.loader.load( '/w/index.php?title=Bruger:Rodejong/DisamAssist.js&action=raw&ctype=text/javascript' ); 
mw.loader.load( '/w/index.php?title=Bruger:SimmeD/Scripts/getUserInformation.js&action=raw&ctype=text/javascript' ); 
mw.loader.load( '/w/index.php?title=Bruger:SimmeD/Scripts/hurtig-skabeloner.js&action=raw&ctype=text/javascript' ); 
mw.loader.load( '/w/index.php?title=Bruger:Rodejong/klein.js&action=raw&ctype=text/javascript' );           // Marker ændringer på sider i min usernamespace som "little"
mw.loader.load( '/w/index.php?title=User:Ucucha/duplinks.js&action=raw&ctype=text/javascript' );            // [[User:Ucucha/duplinks]]

$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).then( function() {
mw.util.addPortletLink('p-tb', '/wiki/Special:Prefixindex/' + encodeURIComponent( mw.config.get( 'wgPageName' ) ), 'Prefixindex', 'tb-prefixindex', 'Prefixindex', null, document.getElementById('t-whatlinkshere') || document.getElementById('t-upload') ); 
// Zoeken op Wikidata naar de exacte titel
// mw.util.addPortletLink('p-cactions', '//www.wikidata.org/wiki/Special:ItemByTitle?site=nlwiki&page=' + mw.config.get( 'wgPageName' ) + "&submit=Zoeken", "data:", "data:", "data:");
// mw.util.addPortletLink('p-cactions', '/w/index.php?title=' + wgPageName + '&action=purge', 'P', 'purge-page', 'Purge'); 
// mw.util.addPortletLink('p-personal', '/w/index.php?title=Special:MyPage/sandbox&action=edit', 'Sandbox', 'pt-sandbox', 'Sandbox', null, '#pt-preferences' );
// mw.util.addPortletLink('p-tb', "/wiki/Special:NewPagesFeed" ,"New Pages","tb-Newpages","View the New Pages Feed"); 
// mw.util.addPortletLink('p-tb', "/wiki/Portal:" + wgPageName, "Portal", 'tb-portal', 'Portal', null, document.getElementById('t-whatlinkshere') || document.getElementById('t-upload') );
// mw.util.addPortletLink('p-tb', "/wiki/Portaldiskussion:" + wgPageName, "Portaldiskussion", 'tb-portaldiskussion', 'Portaldiskussion', null, document.getElementById('t-whatlinkshere') || document.getElementById('t-upload') );
});

// Start ny indlæg ved "+" isf "Nyt afsnit"
$(function(){
  $("#ca-addsection span a").html("+");
});

// Tab "Vis historie" erstattes af "His" 
if(mw.config.get( 'wgDBname' ) === 'dawiki'){
$(function(){
  $("#ca-history span a").text("His");
});
} 

/**
 * Extra buttons in toolbar
 * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
 */
$.ajax({
	url: 'https://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
	dataType: 'script',
	cache: true
}).done(function () {
// Internal link
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-myspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/c/c0/Button_link.png',
		label: 'Insert Internal link',
		insertBefore: '[[',
		insertAfter: ']]',
		sampleText: 'text'
	});
//Welkom nieuwe IPgebruiker
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/8/8a/Toolbar_user.png',
		label: 'Welkom nieuwe IPgebruiker',
		insertBefore: '{\{velkommenIP\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Welkom nieuwe gebruiker
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/f/f2/Button_prononciation.png',
		label: 'Welkom nieuwe gebruiker',
		insertBefore: '{\{velkommen\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Welkom nieuwe gebruiker Engels
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/f/f2/Button_prononciation.png',
		label: 'Welcome nieuwe gebruiker',
		insertBefore: '{\{welcome\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Wikipedia er ikke
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/1/11/Button_ER.png',
		label: 'Er ikke',
		insertBefore: '{\{erikke\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Test
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/7/76/Testwarn1.png',
		label: 'Test',
		insertBefore: '{\{Test\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Test2
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/0/03/Testwarn2.png',
		label: 'Test2',
		insertBefore: '{\{test2\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Test3
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/7/72/Testwarn3.png',
		label: 'Test3',
		insertBefore: '{\{test3\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: '# \~\~\~\~\~ \<Grund\> på \[\[side\]\]'
	});
//Skabelon:Nonsens
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/0/00/Warncreate4.png',
		label: 'Nonsens',
		insertBefore: '\{\{Nonsens\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Hurtigslet
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/9/9d/Button_halt.png',
		label: 'hurtigslet',
		insertBefore: '{\{hurtigslet\|1\= \}\}',
		insertAfter: '',
		sampleText: ''
	});
//Hurtig slet forklaret
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/f/f4/Deletewarn4.png',
		label: 'hurtigslet forklaret',
		insertBefore: 'Hej \{\{PAGENAME\}\}, jeg har bedt vores administratorer at fjerne \[\[......\]\] fordi jeg agter den (i denne form) ikke egnede for Wikipedia. Måske kan du bruge \[\[Wikipedia:Stilmanual\|Stilmanualen\]\]\; her kan du læse dig til hvordan en artikel skal skrives. Se også \[\[Hjælp:Almindelige begynderfejl\]\]. Hvis du har flere spørgsmål, så er du velkommen til at henvende dig til vores \[\[Hjælp:Nybegynderforum\|Nybegynderforum\]\]\! - \~\~\~\~',
		insertAfter: '',
		sampleText: ''
	});
//Slet
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/9/9d/Testwarn4.png',
		label: 'sletteforslag',
		insertBefore: '{\{notabilitet\|SDBS\=ja\|1\= \}\}',
		insertAfter: '',
		sampleText: ''
	});
//Husk
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/4/48/Deletewarn1.png',
		label: 'Husk',
		insertBefore: '{\{Husk\|.....|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Husk Sandkasse
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/7/7d/Deletewarn2.png',
		label: 'Sandkasse',
		insertBefore: '\{\{Husk sandkasse\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Husk Wikidata
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/e/ef/Button_Wikidata_editor_toolbar.png',
		label: 'Wikidata',
		insertBefore: '\{\{Husk Wikidata\|1\=\~\~\~\~\}\}',
		insertAfter: '',
		sampleText: ''
	});
	//Skabelon:infoboks Wikidata person
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/e/ee/Button_vote_biblio.png',
		label: 'infoboks Wikidata person',
		insertBefore: '\{\{infoboks Wikidata person \|wikidata\=alle \|ingen_wikidata\= \}\}',
		insertAfter: '',
		sampleText: ''
	});
//Skabelon:autoritetsdata
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/2/28/Button_info.png',
		label: 'autoritetsdata',
		insertBefore: '\{\{autoritetsdata\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Skabelon:Sportshenvisninger
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/1/13/Button_soccer.png',
		label: 'sportshenvisninger',
		insertBefore: '\*\{\{sportshenvisninger\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Invoegen FødtDødNavn
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png',
		label: 'FødtDødNavn',
		insertBefore: '\{\{FD\|fødselsår\|dødsår\|efternavn, fornavn\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Invoegen Oversættelse
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/6/67/Button_BY.png',
		label: 'Oversættelse',
		insertBefore: '\{\{Oversættelse\|sprog\= \|titel\= \|oldid\= \|dato\= \}\}',
		insertAfter: '',
		sampleText: ''
	});
//Skabelon:nl sprog
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/a/ad/Button_l_nl.png',
		label: 'Skabelon:nl sprog',
		insertBefore: '\{\{nl sprog\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Skabelon:·
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/5/57/Dotpng-button-bg.png',
		label: 'Skabelon:·',
		insertBefore: '\{\{·\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Skabelon:Wikify
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/d/df/ProveitOldIcon.png',
		label: 'Wikificering',
		insertBefore: '\{\{Wikify\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Strikethrough
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/c/c9/Button_strike.png',
		label: 'Strikethrough',
		insertBefore: '\<s\>',
		insertAfter: '\<\/s\>',
		sampleText: 'tekst'
	});
//Subscrift
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/a/aa/Button_sub_letter.png',
		label: 'Subskrift',
		insertBefore: '\<sub\>',
		insertAfter: '\<\/sub\>',
		sampleText: 'sub'
	});
//Supscrift
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/6/6a/Button_sup_letter.png',
		label: 'Supscrift',
		insertBefore: '\<sup\>',
		insertAfter: '\<\/sup\>',
		sampleText: 'sup'
	});
//CodeNowiki
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/8/80/Toolbar_insert_nowiki.png',
		label: 'CodeNowiki',
		insertBefore: '\<code\>\<nowiki\>',
		insertAfter: '\<\/nowiki\>\<\/code\>',
		sampleText: ''
	});
//Code
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/2/23/Button_code.png',
		label: 'Code',
		insertBefore: '\<code\>',
		insertAfter: '\<\/code\>',
		sampleText: ''
	});
//Pre
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/3/3c/Button_pre.png',
		label: 'Pre',
		insertBefore: '\<pre\>',
		insertAfter: '\<\/pre\>',
		sampleText: ''
	});
//REF
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png',
		label: 'Ref',
		insertBefore: '\<ref\>',
		insertAfter: '\<\/ref\>',
		sampleText: ''
	});
//REFLIST
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/f/fe/Button_refs.png',
		label: 'Reflist',
		insertBefore: '\=\=Noter\=\=\{\{reflist\}\}',
		insertAfter: '',
		sampleText: ''
	});
//Mellemrum
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/1/16/Nbsp-button-bg.png',
		label: 'Mellemrum',
		insertBefore: '\&nbsp\;',
		insertAfter: '',
		sampleText: ''
	});
//Gallery
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/d/de/Button_image.png',
		label: 'Gallery',
		insertBefore: '\<gallery mode\=packed heights\=180px\>',
		insertAfter: '\<\/gallery\>',
		sampleText: ''
	}); 
// Nowrap
	krInsertWikiEditorButton({
		 id: 'mw-firstextraeditbutton',
		 icon: '//upload.wikimedia.org/wikipedia/commons/f/f3/Button_brrm.png',
		 label: 'Nowrap invoegen',
		 insertBefore: '\{\{Nowrap|',
		 insertAfter: '\}\}',
		 sampleText: 'text'
	});
//en dash –
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/4/49/Toolbaricon_en_dash.png',
		label: '–',
		insertBefore: '\–\;',
		insertAfter: '',
		sampleText: ''
	});
//IJ
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/6/6c/Toolbaricon_italic_Y.png',
		label: 'IJ',
		insertBefore: '\IJ\;',
		insertAfter: '',
		sampleText: ''
	});
//ij
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/5/52/Toolbaricon_italic_y.png',
		label: 'ij',
		insertBefore: '\ij\;',
		insertAfter: '',
		sampleText: ''
	});
// Done
	krInsertWikiEditorButton({
		id: 'mw-customeditbutton-anotherspecialbutton',
		icon: '//upload.wikimedia.org/wikipedia/commons/e/e9/Button_done.png',
		label: 'Done',
		insertBefore: '\[\[File:Crystal Clear action apply.png\|17px\|',
		insertAfter: 'Done\]\]',
		sampleText: ''
	});
});