Szerkesztő:KeFe/monobook.js
Megjegyzés: közzététel után frissítened kell a böngésződ gyorsítótárát, hogy lásd a változásokat.
- Firefox / Safari: tartsd lenyomva a Shift gombot és kattints a Frissítés gombra a címsorban, vagy használd a Ctrl–F5 vagy Ctrl–R (Macen ⌘–R) billentyűkombinációt
- Google Chrome: használd a Ctrl–Shift–R (Macen ⌘–Shift–R) billentyűkombinációt
- Internet Explorer / Edge: tartsd nyomva a Ctrl-t, és kattints a Frissítés gombra, vagy nyomj Ctrl–F5-öt
- Opera: Nyomj Ctrl–F5-öt
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');
var noForceSummary = 1;
/*
<pre>
*/
function addCustomLinks() {
var customLinks = [
'Gúgöl', '//www.google.com',
'WikiTeX', '//hu.wikipedia.org/wiki/Wikip%C3%A9dia:K%C3%A9pletle%C3%ADr%C3%B3_nyelv',
'Wikibuksz', '//hu.wikibooks.org/wiki/Speci%C3%A1lis:Recentchanges'
];
for (var i = 0; i < customLinks.length; i+=2) {
mw.util.addPortletLink('p-tb', customLinks[i + 1], customLinks[i]);
}
}
$(addCustomLinks);
// Extra buttons for the edit toolbar, based on http://hu.wikipedia.org/w/index.php?title=MediaWiki:Common.js&oldid=5090124
function InsertPrivatButtonsToToolBar() {
// pre button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3c/Button_pre.png",
"speedTip": "pre",
"tagOpen": "\n<pre>\n",
"tagClose": "\n</pre>\n",
"sampleText": "szöveg" };
// blockquote button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/f/fd/Button_blockquote.png",
"speedTip": "blockquote",
"tagOpen": "<blockquote>\n",
"tagClose": "</blockquote>\n",
"sampleText": "szöveg" };
// span button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/7/72/Button_span_2.png",
"speedTip": "span",
"tagOpen": "<span style=\"\">",
"tagClose": "</span>",
"sampleText": "szöveg" };
// i button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1d/Button_italic.png",
"speedTip": "i",
"tagOpen": "<i>",
"tagClose": "</i>",
"sampleText": "szöveg" };
// cite book button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png",
"speedTip": "cite book",
"tagOpen": "\n{{Cite book ",
"tagClose": "\n}}\n",
"sampleText": "\n| author = \n| authorlink = \n| title = \n| url = \n| chapter = \n| chapterurl = \n| series = \n| edition = \n| isbn = \n| publisher = \n| location = \n| year = \n| accessdate = "
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "//upload.wikimedia.org/wikipedia/commons/b/bd/Btn_plus.png",
"speedTip": "Tudakozó",
"tagOpen": "== A [[Wikipédia:Tudakozó|Tudakozó]]ban kérdezték==\nJó lenne beleszőni a cikkbe:<blockquote>",
"tagClose": "</blockquote>",
"sampleText": "szöveg" };
}
addOnloadHook(InsertPrivatButtonsToToolBar);
// Figyelőlistán utolsó betöltés óta történt változtatások
$(function () {
if (!wgCanonicalSpecialPageName || wgCanonicalSpecialPageName != "Watchlist") return;
if (!document.forms[0] || !document.forms[0].namespace) return;
var link = document.createElement('a');
link.id = 'listSince';
link.href = '#listSince'; // must have a href to show as link!
var then = +(new Date());
var fixLinkHref = function () {
var url = window.location.href.split('#')[0];
var days = (( +(new Date()) - then ) + (60 * 1000)) / (1000 * 3600 * 24);
if (url.match(/[?&]days=/))
this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days);
else
this.href = url + (url.indexOf('?') < 0 ? '?':'&') + 'days=' + days;
return true;
};
link.onclick = fixLinkHref;
link.onmousedown = fixLinkHref; // react to middle clicks too
var frag = document.createDocumentFragment();
frag.appendChild(document.createTextNode(' | '));
frag.appendChild(link);
link.appendChild(document.createTextNode('Változtatások'));
frag.appendChild(document.createTextNode(' az utolsó betöltés óta'));
// just one little ID attribute would be _so_ nice...
var nsSelectForm = document.getElementsByTagName('form')[0];
nsSelectForm.parentNode.insertBefore(frag, nsSelectForm);
});
/*
</pre>
*/