Gebruiker:Christoffel K/monobook.js
Opmerking: na het publiceren moet je misschien je browsercache legen om de veranderingen te zien.
- Firefox / Safari: houd Shift ingedrukt terwijl u:je op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)
- Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)
- Edge: houd Ctrl ingedrukt terwijl u:je op Vernieuwen klikt of druk op Ctrl-F5.
// [[en:User:Lupin/popups.js]] - please include this line
document.write('<script type="text/javascript" src="'
+ 'http://en.wiki.x.io/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
popupFixDabs=true;
popupFixRedirs=true;
popupImages=false;
popupMaxWidth=450;
popupRevertSummary='Wijzigingen m.b.v. pop-ups hersteld tot versie %s';
popupRevertSummaryPrompt=true;
popupFixDabsSummary='Linkfix m.b.v. pop-ups van %s naar %s';
popupFixRedirsSummary='Redirectfix m.b.v. pop-ups van %s naar %s';
popupAdminLinks=true;
//<nowiki>
//-------------------------------------------------------------
// Provide links to hide all pages by an editor in Special:Newpages
// By [[User:Zanaq]] - 3 april 2006
//-------------------------------------------------------------
function hideEdits(editor)
{
newpages=document.getElementById('bodyContent').getElementsByTagName('li');
for (i=0;i<newpages.length;i++)
{
editorName=newpages[i].getElementsByTagName('a')[2].innerHTML;
if (editorName == editor)
newpages[i].style.display='none';
}
}
function addHideLinks()
{
newpages=document.getElementById('bodyContent').getElementsByTagName('li');
for (i=0;i<newpages.length;i++)
{
editorLink=newpages[i].getElementsByTagName('a')[1];
var hideLink = document.createElement('span');
hideLink.innerHTML='<a href="javascript:hideEdits(\'' + editorLink.innerHTML+ '\')">(verberg)</a> ';
newpages[i].insertBefore(hideLink, editorLink);
if ((i % 50) == 0) akeytt();
}
akeytt();
}
if (document.location.href.indexOf(':Newpages') != -1)
window.addEventListener ('DOMContentLoaded',addHideLinks,false);
// This is based on the original code at en:User:MarkS/extraeditbuttons.jsbased which
// was based on the original code on Wikipedia:Tools/Editing tools
//
// The original code was on the project page and needed to be cut and paste to the user's
// monobook.js page. However, this caused problems with the quote marks. So I have moved
// it to its own page.
//
// I do not know a lot about Javascript so please do not ask for a complicated change
//
// See the [[User:MarkS/Extra edit buttons]] for changes log
function InsertButtonsToToolBar()
{
//Strike-Out Button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "doorstrepen",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Tekst doorstrepen"}
//Left-Text Button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/e/ea/Button_align_left.png",
"speedTip": "links uitlijnen",
"tagOpen": "<div style='text-align: left; direction: ltr; margin-left: 1em;'>\n",
"tagClose": "\n</div>",
"sampleText": "Tekst links uitlijnen"}
//Center-Text Button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/5/5f/Button_center.png",
"speedTip": "centreren",
"tagOpen": "<div style='text-align: center;'>\n",
"tagClose": "\n</div>",
"sampleText": "Tekst centreren"}
//Table button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "tabel",
"tagOpen": "\n{| class=prettytable \n|- \n| 1 || 2\n|- \n| 3 || 4",
"tagClose": "\n|}\n",
"sampleText": ""}
//Line break button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/13/Button_enter.png",
"speedTip": "nieuwe regel",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""}
//Superscript
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/8/80/Button_upper_letter.png",
"speedTip": "superscript",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Superscript tekst"}
//Subscript
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/7/70/Button_lower_letter.png",
"speedTip": "subscript",
"tagOpen": "<sub>",
"tagClose": "</sub>",
"sampleText": "Subscript tekst"}
//Small Text
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/5/58/Button_small.png",
"speedTip": "klein",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Kleine tekst"}
//Comment
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/3/34/Button_hide_comment.png",
"speedTip": "Invoegen verborgen commentaar",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Commentaar"}
//Gallery
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Invoegen van een afbeeldingsgallerij",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:FileName.jpg|Caption1\\Image:FileName2.jpg|Caption2"}
//Secondary Headline
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/e/e9/Button_headline2.png",
"speedTip": "Kopje op derde niveau",
"tagOpen": "\n===",
"tagClose": "===",
"sampleText": "Kopje op derde niveau"}
//Tabs
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/8/8e/Button_shifting.png",
"speedTip": "Inspringen",
"tagOpen": ":",
"tagClose": "",
"sampleText": ":"}
//Block Quote
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/f/fd/Button_blockquote.png",
"speedTip": "Invoegen blockquote",
"tagOpen": "<blockquote style='border: 1px solid blue; padding: 2em;'>\n",
"tagClose": "\n</blockquote>",
"sampleText": "Blockquote"}
//Colour
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/1e/Button_font_color.png",
"speedTip": "Invoegen gekleurde tekst",
"tagOpen": "<span style='color: ColorName'>",
"tagClose": "</span>",
"sampleText": "Span of tekst"}
//Code
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/2/23/Button_code.png",
"speedTip": "Invoegen code",
"tagOpen": "<code>",
"tagClose": "</code>",
"sampleText": "Code"}
//Sub-Link
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/9/93/Button_sub_link.png",
"speedTip": "Invoegen van link naar een onderpagina",
"tagOpen": "[[Page#",
"tagClose": "]]",
"sampleText": "onderpagina"}
//Definition List
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/d/d3/Button_definition_list.png",
"speedTip": "Invoegen definitielijst",
"tagOpen": "\n; ",
"tagClose": " : ",
"sampleText": "Invoegen tekst"}
//Template button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "Sjabloon",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "sjabloonnaam"}
//Category button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/5/5a/Button_category_alt.png",
"speedTip": "Categorie",
"tagOpen": "[[Categorie:",
"tagClose": "]]",
"sampleText": "Categorietitel"}
//Reference link button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "<ref>",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Invoegen referentie"}
//Reference button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/a/a0/Button_references_alt.png",
"speedTip": "Reference footer",
"tagOpen": "<references/>",
"tagClose": "",
"sampleText": ""}
}
$( InsertButtonsToToolBar );
//------------------------------------------------------------------------------------
// Provide links to hide all edits by an editor in Special:Recentchanges
// Note: This script doesn't work with the "Enhanced recent changes (JavaScript)"
// By [[:nl:User:Erwin85]] - December 12th, 2006 - Released under the GNU GPL
// Based on [[:nl:Help:Gebruik van scripts/Nieuwe artikelenscript]]
// By [[User:Zanaq]] - 3 april 2006 - released under GPL: please include this line
//-------------------------------------------------------------------------------------
function rchideEdits(editor)
{
listitems = document.getElementById('bodyContent').getElementsByTagName('li');
for (i=0; i<listitems.length; i++)
{
editorName = ''
editorLinks = listitems[i].getElementsByTagName('a');
for (j=0; j<editorLinks.length; j++)
{
if(editorLinks[j].href.indexOf('Gebruiker:') != -1 && editorLinks[j].href.indexOf('title=Gebruiker:') == -1 && editorLinks[j].innerHTML.indexOf('Gebruiker:') == -1)
{
editorName = listitems[i].getElementsByTagName('a')[j].innerHTML;
break;
}
}
if (editorName == editor)
{
listitems[i].style.display='none';
}
}
}
function rcaddHideLinks()
{
listitems = document.getElementById('bodyContent').getElementsByTagName('li');
for (i=0; i<listitems.length; i++)
{
editorLinks = listitems[i].getElementsByTagName('a');
for (j=0; j<editorLinks.length; j++)
{
if(editorLinks[j].href.indexOf('Gebruiker:') != -1 && editorLinks[j].href.indexOf('title=Gebruiker:') == -1 && editorLinks[j].innerHTML.indexOf('Gebruiker:') == -1)
{
editorLink = editorLinks[j];
var hideLink = document.createElement('span');
hideLink.innerHTML='(<a href="javascript:rchideEdits(\'' + editorLink.innerHTML+ '\')">verberg</a>) ';
listitems[i].insertBefore(hideLink, editorLink);
break;
}
}
if ((i % 50) == 0)
{
akeytt();
}
}
akeytt();
}
addOnloadHook(
function ()
{
if (document.location.href.indexOf(':Recentchanges') != -1)
{
rcaddHideLinks();
}
}
)
//</nowiki>