User:MarkvA/global.js

//

function WikiLinks { }

addOnloadHook(WikiLinks); importScriptPage('PurgeButton/code.js', 'dev');

/*** gepersonaliseerde bewerk knoppen*****/ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/28/Button_wikilink.png?1", "speedTip": "Link", "tagOpen": "w:c:",    "tagClose": "", "sampleText": "Wikinaam"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/3/3b/Button_template_alt.png?1", "speedTip": "Sjabloon", "tagOpen": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/b/b4/Button_category03.png?1", "speedTip": "Categorie", "tagOpen": "[[Category:",    "tagClose": "]]", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/c/c8/Button_redirect.png?1", "speedTip": "Doorverwijzing", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/c/c9/Button_strike.png?1", "speedTip": "Doorstrepen", "tagOpen": " ", "tagClose": " ", "sampleText": "Doorgestreepte tekst"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/f/f6/Button_html_comment.png?1", "speedTip": "HTML opmerking", "tagOpen": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/23/Button_code.png?1", "speedTip": "Code", "tagOpen": " ", "sampleText": "Voer code hier in"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/7/73/Button_code_nowiki.png?1", "speedTip": "Code+Nowiki", "tagOpen": " ", "sampleText": "Voer code hier in"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/9/9f/Button_defaultsort.png?1", "speedTip": "Defaultsort", "tagOpen": "", "sampleText": "Voer sleutel hier in"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/3/33/Button_onlyinclude.png", "speedTip": "Onlyinclude", "tagOpen": "<" + "onlyinclude" + ">", "tagClose": "", "sampleText": "Voer sleutel hier in"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/d/d1/Button_pipehack.png?1", "speedTip": "WikiTable hack", "tagOpen": "|", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Mijn globale gebruikerspagina sjabloon", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Mijn globale overlegpagina sjabloon", "tagOpen": "", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Mijn globale gebruikerspagina (NL)", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/29/Button_user.png?1", "speedTip": "Mijn globale overlegpagina sjabloon (NL)", "tagOpen": "", "tagClose": "", "sampleText": ""}; } /*********begin fd setup ******************/ function appendScript(url) { var scriptElem = document.createElement('script'); scriptElem.setAttribute('src',url); scriptElem.setAttribute('type','text/javascript'); document.getElementsByTagName('head')[0].appendChild(scriptElem); } importScriptPage('User:Splarka/fastdelete.js', 'www'); /*********beëindig fd setup, begin fd gebruik ******************/

var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'S'}; fdButtons[fdButtons.length] = { 'summary': 'Vandalism', 'label': 'V'}; fdButtons[fdButtons.length] = { 'summary': 'Marked for deletion', 'label': 'M'}; fdButtons[fdButtons.length] = { 'summary': 'Housekeeping', 'label': 'H'}; fdButtons[fdButtons.length] = { 'summary': 'Editing test', 'label': 'T'}; fdButtons[fdButtons.length] = { 'summary': 'Talk page from deleted page', 'label': 'TPD'}; fdButtons[fdButtons.length] = { 'summary': ' ', 'label': 'NR'}; /*************beëindig fd************************************/

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// GEAVANCEERDE AUTOMATISCH VERNIEUWENDE RECENTE WIJZIGINGEN EN VOLGLIJST // Code courtesy of "pcj" of WoWWiki.

// INDIVIDUEEL GEBRUIK // Dit is een niet-gemodificeerde versie van de WoWWiki site-wide versie, alleen vertaald naar het Nederlands // Deze versie is specifiek ontworpen voor Special:Mypage/global.js gebruik.

// WIKI-WIDE GEBRUIK // Als je het toevoegd aan een Wiki's MediaWiki:Common.js *zou* hij moeten werken - dit is niet getest. // Het zou niet moeten conflicten met je eigen global.js

// WAT HET DOET // De voegt voegt een checkbox bovenaan Special:RecentChanges en Special:Watchlist, naast de header. // Hem aanvinken activeert een cookie (specifiek voor iedere Wiki) en begint met het updaten van de lijst. // Dit gebeurt in stilte iedere 60 seconde zonder een volledige pagina vernieuwing.

///////////////////////////////////////////////////////////////////////////////////////////////////////////

ajaxPages="Special:RecentChanges,Special:Watchlist,Speciaal:RecenteWijzigingen,Speciaal:Volglijst";

function setCookie(c_name,value,expiredays) { var exdate=new Date exdate.setDate(exdate.getDate+expiredays) document.cookie=c_name+ "=" +escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString) }

function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "=") if (c_start!=-1) { c_start=c_start + c_name.length+1 c_end=document.cookie.indexOf(";",c_start) if (c_end==-1) c_end=document.cookie.length return unescape(document.cookie.substring(c_start,c_end)) } } return "" }

function getXmlHttpRequestObject { if (window.XMLHttpRequest) { return new XMLHttpRequest; //Not Internet Explorer } else if(window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); //Internet Explorer } else { //fail silently } } getRCDataRO = getXmlHttpRequestObject; var cr = new RegExp("\r", "gm"); var lf = new RegExp("\n", "gm"); var endText = new RegExp(' [\t\s]*?[\t\s]*? ', "mi"); var rcTimer; var rcRefresh = 60000; function preloadAJAXRC { if (skin == "monaco") { s = 1; } else { s = 0; } ajaxRCCookie = (getCookie("ajaxload-"+wgPageName)=="on") ? true:false; document.getElementsByTagName("h1")[0].innerHTML += ' AUTO-VERNIEUWING: '; document.getElementById("ajaxRCtoggle").checked = ajaxRCCookie; if (getCookie("ajaxload-"+wgPageName)=="on") loadRCData; }

function toggleRC { if (document.getElementById("ajaxRCtoggle").checked == true) { setCookie("ajaxload-"+wgPageName, "on", 30); loadRCData; } else { setCookie("ajaxload-"+wgPageName, "off", 30); clearTimeout(rcTimer); } }

function loadRCData { if (getRCDataRO.readyState == 4 || getRCDataRO.readyState == 0) { if (location.href.indexOf("/wiki/")) { rcURL = "http://" + location.hostname + "/wiki/" + wgPageName + location.search; } else { rcURL = "http://" + location.hostname + "/" + wgPageName + location.search; }

//rcURL = 'http://disneyparks.wikia.com/index.php?title=Special:RecentChanges&from=20080930151557&days=30&limit=500&hideminor=0';

getRCDataRO.open("GET", rcURL, true); getRCDataRO.onreadystatechange = parseRCdata; getRCDataRO.send(null); } }

function parseRCdata { if (getRCDataRO.readyState == 4) { textFilter = new RegExp(' .*? [\t\s]*?[\t\s]*? ', "i"); rawRCdata = getRCDataRO.responseText.replace(cr, "").replace(lf, ""); filteredRCdata = textFilter.exec(rawRCdata); updatedText = filteredRCdata[0].replace(' ', "").replace(endText, ""); document.getElementById("bodyContent").innerHTML = updatedText + document.getElementById("bodyContent").innerHTML; rcTimer = setTimeout("loadRCData;", rcRefresh); } }

if (ajaxPages.indexOf(wgPageName)!=-1) { addOnloadHook(preloadAJAXRC); }

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// EINDE VAN DE CODE

///////////////////////////////////////////////////////////////////////////////////////////////////////////

//