Gebruiker:Tom Meijer/monobook.js
Uiterlijk
(Doorverwezen vanaf Gebruiker:PalaeoMal/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.
//Gecopieerd van 'WebBoy':
//<nowiki> Geen -- voor de handtekening, als je op de handtekeningknop drukt.
(function () {
var oldAddButton = addButton;
if (typeof(oldAddButton) != 'function') return;
addButton = function () {
if (arguments.length > 2)
arguments[2] = arguments[2].replace(/^--(~+)$/, '$1');
oldAddButton.apply(this, arguments);
};
})();
//</nowiki>
// qPreview [[en:User:Alex Smotrov/qpreview.js]]
var qPreviewKey = '`';
var qPreviewName = 'QPreview';
function qPreviewButton(){
addToolbarButton(qPreviewName, qPreview, 'btnQPreview', 'Quick Preview', qPreviewKey);
}
$(qPreviewButton);
function qPreview(){
var divPreview = document.getElementById('wikiPreview');
if (!divPreview) return;
var btnQPreview = document.getElementById('btnQPreview');
if (btnQPreview) btnQPreview.value = 'Wait...';
a = sajax_init_object();
a.open('POST', document.editform.action+'&live', true);
var Boundary = '--------p1415';
a.setRequestHeader('Content-Type', 'multipart/form-data; boundary='+Boundary);
var PostData = '--' + Boundary
+ '\nContent-Disposition: form-data; name="wpTextbox1"\n\n'
+ document.getElementById('wpTextbox1').value + '\n--'+Boundary;
if (a.overrideMimeType) a.overrideMimeType('text/html');
a.send(PostData);
a.onreadystatechange = function(){
if (a.readyState != 4) return;
var html = a.responseText;
html = html.replace(/>/g,'>').replace(/</g,'<').replace(/"/g,'"').replace(/&/g,'&').replace(/'/g,"'");
divPreview.innerHTML = html;
if (btnQPreview) btnQPreview.value = qPreviewName;
};
}
//Adds a text button to edit toolbar
function addToolbarButton(name, onclick, id, tooltip, accesskey){
var toolbar = document.getElementById('toolbar');
if (!toolbar) return;
var newBtn = document.createElement('input');
newBtn.type = 'button';
newBtn.style.background = '#adbede';
newBtn.style.height = '22px';
newBtn.style.verticalAlign = 'middle';
if (name) newBtn.value = name;
if (onclick) newBtn.onclick = onclick;
if (id) newBtn.id = id;
if (tooltip) newBtn.title = tooltip;
if (accesskey) newBtn.accessKey = accesskey;
toolbar.appendChild(newBtn);
return newBtn;
}
//gecopieerd van troefkaart:
//pop-ups
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
popupDelay=1;
popupImages=false;
imagePopupsForImages=false;
popupFixDabs=true;
popupLiveOptions=true;
popupFixRedirsSummary=("linkfix");
popupRevertSummary=("wijziging teruggedraaid");
popupSummaryData=false;
//Voeg extra links toe aan het menu links m.b.v. de functie addLink
function addLink(where, url, name, id, title, key, after) {
// addLink() accepts either an id or a DOM node, mw.util.addPortletLink() only takes a node
if (after && !after.cloneNode)
after = document.getElementById(after);
return mw.util.addPortletLink(where, url, name, id, title, key, after);
}
$( function(){
addLink("p-navigation", "http://nl.wikipedia.org/wiki/Speciaal:Specialpages", "Speciale pagina's", "n-specialpages", "Speciale pagina's", 0);
addLink("p-tb", "http://nl.wikipedia.org/wiki/Speciaal:Prefixindex/", "Pagina's beginnend met", "n-prefixindex", "Pagina's beginnend met", 0);
addLink("p-tb", "irc://irc.freenode.net/wikipedia-nl", "IRC", "n-IRC", "IRC", 0);
addLink("p-navigation", "http://nl.wikipedia.org/wiki/Categorie:Wikipedia:Nuweg", "Categorie:Nuweg", "n-nuweg", "Categorie:Nuweg", 0);
});
// [[User:Dschwen/highlightredirects.js]] - please include this line
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/highlightredirects.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// Andere hoofdpagina
var mpTitle = "Hoofdpagina";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle)
if (isMainPage)
{window.location="http://nl.wikipedia.org/wiki/Wikipedia:Hoofdpagina (oud)";}
// Extra knopjes in de toolbar
// Gebaseerd op [[:en:Wikipedia:Tools/Editing tools]]. Maintainers: [[:en:User:MarkS|User:MarkS]]?, [[:en:User:Voice of All|User:Voice of All]], [[:en:User:R. Koot|User:R. Koot]]
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c4/Button_ref.png",
"speedTip": "Referentie",
"tagOpen": '<ref>',
"tagClose": "</ref>",
"sampleText": "Plaats hier de gewenste referentie"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/64/Buttonrefvs8.png",
"speedTip": "Bronvermelding",
"tagOpen": '==Bronnen, noten en/of referenties==\n<references />',
"tagClose": "",
"sampleText": ""};
}
//<pre><nowiki>
//** Speciaal:Zoeken met zoekmenuutje *******************************************************
//*
//* Description: Change Special:Search to use a drop-down menu, with the default being
//* the internal MediaWiki engine
//* Created and maintained by: [[:en:User:Gracenotes]]. Gejat van [[:en:MediaWiki:Common.js]]
if (wgCanonicalSpecialPageName == "Search") {
var searchEngines = [];
addOnloadHook(SpecialSearchEnhanced);
}
function SpecialSearchEnhanced() {
var createOption = function(site, action, mainQ, addQ, addV) {
var opt = document.createElement('option');
opt.appendChild(document.createTextNode(site));
searchEngines[searchEngines.length] = [action, mainQ, addQ, addV];
return opt;
}
var searchForm = document.forms['search'];
var selectBox = document.createElement('select');
selectBox.id = 'searchEngine';
searchForm.onsubmit = function() {
var optSelected = searchEngines[document.getElementById('searchEngine').selectedIndex];
searchForm.action = optSelected[0];
searchForm.lsearchbox.name = optSelected[1];
searchForm.title.value = optSelected[3];
searchForm.title.name = optSelected[2];
}
selectBox.appendChild(createOption('MediaWiki search', wgScriptPath + '/index.php', 'search', 'title', 'Special:Search'));
selectBox.appendChild(createOption('Google', 'http://www.google.com/search', 'q', 'sitesearch', 'en.wikipedia.org'));
selectBox.appendChild(createOption('Yahoo', 'http://search.yahoo.com/search', 'p', 'vs', 'en.wikipedia.org'));
selectBox.appendChild(createOption('Windows Live', 'http://search.live.com/results.aspx', 'q', 'q1', 'site:http://en.wikipedia.org'));
selectBox.appendChild(createOption('Wikiwix', 'http://www.wikiwix.com/', 'action', 'lang', 'en'));
selectBox.appendChild(createOption('Ilse', 'http://wikipedia.ilse.nl/searchresults.jspx', 'q', 'q1'));
searchForm.lsearchbox.style.marginLeft = '0px';
var lStat = document.getElementById('loadStatus');
lStat.parentNode.insertBefore(selectBox, lStat);
}
// === Verplaats "bewerken"-links op alle pagina's ===
/* van Gebruiker:NielsF/monobook.js: */
// BEGIN Mooving of the editsection links
/*
* moveEditsection
* Dieses Script verschiebt die Editsection-Buttons von rechts oberhalb
* der Überschriften in die Überschriften.
* Positiv getestet unter: Firefox 1.0, Opera 8.0, Internet Explorer 6.0
* Anmerkungen, Verbesserungen, Hinweise, Nörgeleien jederzeit gerne gesehen!
*
* Zum Abschalten die folgende Zeile (ohne führendes Sternchen) in die eigene
* monobook.js (zu finden unter [[Benutzername/monobook.js]]) kopieren:
* var oldEditsectionLinks = true;
*
* dbenzhuser (de:Benutzer:Dbenzhuser)
*/
function moveEditsection_OUD() {
if (typeof oldEditsectionLinks == 'undefined' || oldEditsectionLinks == false) {
// Sammelt alle div-Elemente der Klasse "editsection".
var editsections = new Array();
var divs = document.getElementById("bodyContent").getElementsByTagName("div");
for(var i = 0; i < divs.length; i++) {
if(divs[i].className == "editsection") {
editsections.push(divs[i]);
}
}
// Wenn die Seite Editsection-Buttons enthält.
if (editsections.length != 0) {
// Sucht zu jedem Editsection-Button die dazugehörige Überschrfift.
var i = 0;
var element, heading;
while (editsections[i] != null) {
element = editsections[i];
heading = element.nextSibling;
while(!/^H[1-6]$/.test(heading.nodeName)) {
heading = heading.nextSibling;
}
// Erstellt innerhalb der Überschrift ein per CSS formatiertes span-Element.
// Dort hinein wird dann der Editsection-Link verschoben.
// Anschließend werden die Reste des alten Editsection-Buttons entfernt.
var spanElement = document.createElement("span");
var spaceNode = document.createTextNode(" ");
heading.appendChild(spaceNode);
heading.appendChild(spanElement);
spanElement.setAttribute("class", "editsection");
// spanElement.style.fontSize = "x-small";
// spanElement.style.fontWeight = "normal";
while (element.childNodes.length != 0) {
spanElement.appendChild(element.childNodes[0]);
}
element.parentNode.removeChild(element);
i++;
}
}
}
}
// onload
/* addOnloadHook(moveEditsection); DISABLED, 30 SEP 2006, EJB */
// END Mooving of the editsection links
// ============================================================
//</nowiki></pre>
//
/* Version 1.beta.4
[[Image:Zeus_head_thumb-zanaq.png|left]]
'''Zeusmode''' - by [[User:Zanaq|Zanaq]] - is an extensive elaboration of Sam Hocevar's godmode-light script and some other [[Wikipedia:WikiProject_User_scripts/Scripts|scripts]]. It has been tested with [[Mozilla]] and [[Mozilla Firefox]]. Some functionality is retained when using [[Internet Explorer]].
*/
/*<pre><nowiki>
==Zeusmode==
===Features===
* Rollback link in user contribution list and on last diff
* Link to diffs since own last edit on tabs ''and'' in the watchlist
** doesnt work with extended watchlist
* Template checkbox bar in edit window ''and'' most other views
* Link to last diff
* Link for editing top section
* hide one's own differences in the Watchlist
* Opera compatibility and some fixes by valhallasw
=== Credits ===
By [[:en:User:Zanaq]], based on:
*the ''God-like Monobook skin'', (c) 2005 Sam Hocevar <sam@zoy.org>
**$Id: godmode-light.js 980 2005-11-12 01:51:51Z sam $
*Wikipedia user Scripts, http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts
** Add edit top link, by [[:en:User:Pile0nades]]
** Changes since I last edited, by [[:en:User:JesseW]]
** Show last diff, by [[:en:User:JesseW]]
** hideOwn differences in Watchlist, anonymous
** quickWikify, by [[:en:User:Raylu]]
-----------------------------------------------------------------------------
*/
// -----------------------------------------------------------------------------
// Default system messages
// -----------------------------------------------------------------------------
if (navigator.appName != 'Microsoft Internet Explorer') {
var rollbacklink = 'rollback';
var cantrollback = 'Cannot revert edit; last contributor is only author of this page.';
var alreadyrolled = 'Cannot rollback last edit of [[$1]] by [[User:$2|$2]] ([[User talk:$2|Talk]]); someone else has edited or rolled back the page already. Last edit was by [[User:$3|$3]] ([[User talk:$3|Talk]]). ';
var revertpage = 'Reverted edits by [[Special:Contributions/$2|$2]] to last version by $1';
var txtPleaseWait = 'Please wait, reverting edits by ';
var txtErrBadAuth= '<b>Error:</b> Bad authentication token!';
var txtGetHist= 'Getting article history...';
var txtLast = 'Last';
var txtShowMostRecentDiff="Show most recent diff";
var txtComment = 'Comment';
var txtSince = 'Since';
var txtChangesSinceILastEdited = "Changes since I last edited";
var txtEditTopLink = 'edit';
var txtHideLink = 'hide';
var txtSavePage = 'Save';
var txtMinorEdit = '<b>M</b>';
var qTemplate = new Array();
var qPos = new Array();
var qCategory = new Array();
var qTemplateText = new Array();
var qPrompt = new Array();
var qDisplayText = new Array();
var qDefault = new Array();
var dontusesquirlyBrackets = new Array();
var qAdvancedParameters = new Array();
var qHidden = new Array;
var qCustomTemplateIdentifier = new Array();
var stupidEnglishWatchlist = false;
var txtPlace = 'revert to version by [[User:$3|$3]] of $2 ($1)';
var txtPlaceLink = 'place';
var txtDiffPrevious = 'cur';
var txtEditconflict = 'Edit conflict: Someone has altered the page since you last loaded it';
var lenRevisionOf = 0;
var diffadjuster = 2;
var txtParseEditform = 'Parsing the editform <small>(any error in this stage indicates an error in the <a href=http://nl.wikipedia.org/w/index.php?title=Speciaal:Recentchanges&days=14&namespace=8>mediawiki namespace</a>.)</small>: ';
var txtOk = ' Ok';
var txtSubmitEditform = 'Now submitting the form..... ';
var txtPlaceOld = 'Placing old version.... '
var txtLoadEditform = 'Loading the editform ($1): ';
var txtParseHist = 'Parsing article history';
txtLastErr = 'Error: Last editor is $1 not $2';
txtOnlyErr = 'Error: $1 is the only editor!';
var txtNotEdited = 'You have not edited this page! (recently)';
namespaceSpecial = 'Special';
var k = 0;
var templateDeleteIdentifier= 0;
// -----------------------------------------------------------------------------
// Modules and configuration
// -----------------------------------------------------------------------------
//Set the default settings for Recent Changes.
defaultRecentChangesParameters = '?hidepatrolled=1&hideliu=1&limit=500';
//If you are sysop, change false to true in the next line
var isSysop = false;
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/toolbox.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/revert.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/newpages.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/qtemplate.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/' + wgContentLanguage + '.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
//If you want to define your own templates, place a copy of
// [[nl:Gebruiker:Zanaq/Zeusmode/<LANGUAGE_CODE>-templates.js]]
//In your own namespace and replace the following reference with
//a reference to your own namespace, eg. [[User:Whatever/templates.js]]
//for commons you need to replace "' + wgContentLanguage + '" with "commons"
document.write('<scr'+'ipt type="text/javascript"'
+ 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:Zanaq/Zeusmode/' + wgContentLanguage + '-templates.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
}
//</nowiki></pre>