Naar inhoud springen

Gebruiker:Hannes Karnoefel/monobook.js

Uit Wikipedia, de vrije encyclopedie

Opmerking: na het publiceren is het wellicht nodig uw browsercache te 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.
//<nowiki>
// [[Gebruiker:Hannes_Karnoefel/popups.js]]

document.write('<script type="text/javascript" src="' 
             + 'http://nl.wikipedia.org/w/index.php?title=Gebruiker:Hannes_Karnoefel/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
popupImages=false;
popupMaxWidth=450;

//*******************************************************************//
// Buttons for template-uniformisation (uniformisatie van sjablonen) //
//*******************************************************************//

function header(){
        document.editform.wpTextbox1.value = "{|style=\"margin:0.5em 0 0.5em 0; clear:both;\" width=100% class=toccolours \n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "Uniform met {{navigatie}}";
        document.editform.wpMinoredit.checked = false;}

//*******************************************************************//
// redirect shortcut & other handy stuff//
//*******************************************************************//
function categorie() {
        insertTags("[[Categorie:","]]\n","");
        document.editform.wpSummary.value = "+cat";
        document.editform.wpMinoredit.checked = true;}

function nocat() {
        document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n\n{{nocat}}";
        document.editform.wpSummary.value = "{{nocat}}";
        document.editform.wpMinoredit.checked = false;}

function redirect() {
        document.editform.wpTextbox1.value = "#redirect [[]]";
        document.editform.wpSummary.value = "redirect";
        document.editform.wpMinoredit.checked = false;}

function dp() {
        document.editform.wpTextbox1.value = "\'\'\'{{subst:PAGENAME}}\'\'\' kan betrekking hebben op:\n\n*\n*\n\n{{dp}}";
        document.editform.wpSummary.value = "dp";
        document.editform.wpMinoredit.checked = false;}


//*******************************************************************//
// marking articles //
//*******************************************************************//
function auteur() {
        document.editform.wpTextbox1.value = "{{auteur}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "auteur";
        document.editform.wpMinoredit.checked = false;
	document.editform.submit();}

function wiu() {
        document.editform.wpTextbox1.value = "{{wiu}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "wiu";
        document.editform.wpMinoredit.checked = false;}

function weg() {
        document.editform.wpTextbox1.value = "{{weg}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "weg";
        document.editform.wpMinoredit.checked = false;
	document.editform.submit();}


function nuweg() {
        document.editform.wpTextbox1.value = "{{nuweg}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "nuweg";
        document.editform.wpMinoredit.checked = false;
        document.editform.submit();}

function woordenb() {
        document.editform.wpTextbox1.value = "{{wb}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "wb-def";
        document.editform.wpMinoredit.checked = false;
	document.editform.submit();}

function reclame() {
        document.editform.wpTextbox1.value = "{{reclame}}\n"+document.editform.wpTextbox1.value;
        document.editform.wpSummary.value = "reclame";
        document.editform.wpMinoredit.checked = false;
	document.editform.submit();}


//*******************************************************************//
// anonymous user messages //
//*******************************************************************//
function wa() {
        document.editform.wpTextbox1.value = "{{welkomanoniem}}\n\n~~~~";
        document.editform.wpSummary.value = "wa";
        document.editform.wpMinoredit.checked = false;}

function zb() {
        document.editform.wpTextbox1.value = "{{zb}}";
        document.editform.wpSummary.value = "zb";
        document.editform.wpMinoredit.checked = false;}

function puber() {
        document.editform.wpTextbox1.value = "{{puber}}";
        document.editform.wpSummary.value = "pbr";
        document.editform.wpMinoredit.checked = false;}

function ws() {
        document.editform.wpTextbox1.value = "{{ws}}"+document.editform.wpTextbox1.value
        document.editform.wpSummary.value = "ws";
        document.editform.wpMinoredit.checked = false;}

function dsVan() {
        document.editform.wpTextbox1.value =      document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n#~~~~~ vandalisme op ''  '' ";
        document.editform.wpSummary.value = document.editform.wpSummary.value + " + ds";
        document.editform.wpMinoredit.checked = false;}

function dsLeeg() {
        document.editform.wpTextbox1.value =      document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n#~~~~~ leeghalen van ''  '' ";
        document.editform.wpSummary.value = document.editform.wpSummary.value + " + ds";
        document.editform.wpMinoredit.checked = false;}

function dsOnzin() {
        document.editform.wpTextbox1.value =      document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n#~~~~~ toevoegen onzin op ''  '' ";
        document.editform.wpSummary.value = document.editform.wpSummary.value + " + ds";
        document.editform.wpMinoredit.checked = false;}

function dsNieuw() {
        document.editform.wpTextbox1.value =      document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n#~~~~~ aanmaken onzinartikel ";
        document.editform.wpSummary.value = document.editform.wpSummary.value + " + ds";
        document.editform.wpMinoredit.checked = false;}

function idem() {
        document.editform.wpTextbox1.value =
document.editform.wpTextbox1.value.replace(/\n+$/,"")+"\n#~~~~~ idem ";
        document.editform.wpSummary.value = document.editform.wpSummary.value + " + ds";
        document.editform.wpMinoredit.checked = false;}

function blok() {
        document.editform.wpSummary.value = document.editform.wpSummary.value + " Blokkade Gewenst";}


//*******************************************************************//
//*******************************************************************//
//*******************************************************************//
// Event functions //
//*******************************************************************//

// Add the buttons to the page //
function addButtons() {
        str = "<input type=button value=Nav-Sjabl-Begin onclick=\"header()\" class=subbutt><input type=button value=Redirect onclick=\"redirect()\" class=subbutt><input type=button value=DP onclick=\"dp()\" class=subbutt><input type=button value=Categorie onclick=\"categorie()\" class=subbutt><input type=button value=NoCat onclick=\"nocat()\" class=subbutt><br><input type=button value=Auteur onclick=\"auteur()\" class=subbutt><input type=button value=WIU onclick=\"wiu()\" class=subbutt><input type=button value=weg onclick=\"weg()\" class=subbutt><input type=button value=nuweg onclick=\"nuweg()\" class=subbutt><input type=button value=Wb-def onclick=\"woordenb()\" class=subbutt><input type=button value=Reclame onclick=\"reclame()\" class=subbutt>";

if(location.href.match(/gebruiker:/)) {
             str = "<input type=button value=WelkomAno onclick=\"wa()\" class=subbutt><input type=button value=WS onclick=\"ws()\" class=subbutt><input type=button value=\"Idem\" onclick=\"idem()\" class=subbutt><input type=button value=\"Vand. op\" onclick=\"dsVan()\" class=subbutt><input type=button value=\"Leegh. van\" onclick=\"dsLeeg()\" class=subbutt><input type=button value=\"Onz. op\" onclick=\"dsOnzin()\" class=subbutt><input type=button value=\"Onzin-Art.\" onclick=\"dsNieuw()\" class=subbutt><input type=button value=Zandbak onclick=\"zb()\" class=subbutt accesskey=²><input type=button value=Puber onclick=\"puber()\" class=subbutt accesskey=\<><input type=button value=Blok onclick=\"blok()\" class=subbutt>";
        }
document.getElementById("editpage-copywarn").innerHTML="<form action=\"\">"+str+"</form><br/>"+document.getElementById("editpage-copywarn").innerHTML;        
        return false; 
}

//*******************************************************************//
// Declare events //
//*******************************************************************//
if(location.href.match(/action=(edit)|(submit)/)) {
  if (window.addEventListener) {
    window.addEventListener("load", addButtons, false);
  } else if (window.attachEvent) {
    window.attachEvent("onload", addButtons);
  }
} 

//</nowiki>