Szerkesztő:Peti610/vector.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
// Figyelőlistán utolsó betöltés óta történt változtatások
$(function () {
var wgCanonicalSpecialPageName = mw.config.get('wgCanonicalSpecialPageName')
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);
});
// Előnézet
mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Js/ajaxPreview.js&action=raw&ctype=text/javascript") ;
// Bal oldalt 20 előnézet legyen látható a keresőben
wgMWSuggestTemplate = wgMWSuggestTemplate + "&limit=20";
// Automatikus összefoglalók
importScript("Szerkesztő:Tgr/summary.js") ;
// Még fejlettebb friss változtatások
// Ezt használható:
// importScript("Szerkesztő:Hunyadym/rc.js") ;
// Ez fejlesztés alatt van, néha nem működik
importScript("Szerkesztő:Hunyadym/rc_dev.js") ;
Kicsi=1 ;
importScript("Szerkesztő:Hunyadym/showoldid.js") ;
/*
== Szerkesztőgombok a cím mögött; extra szerkesztőgomb a főcím mellett ==
*/
// moves section edit links to the right side of the section title
// (see also the rules for .editsectionmoved in Monobook.css)
// adds section edit link for the lead section next to the main (h1) title
// shows the contents of [[MediaWiki:Editintro-section-0]] above the edit box if used
// (unless the lead section is the same as the whole article)
// var oldEditsectionLinks=true disables the function.
if(document.getElementById && document.createElement) {
function moveSectionEditLinks() {
if(typeof oldEditsectionLinks != 'undefined' && oldEditsectionLinks == true) return;
var headings = false; // no need to show info about how to edit the whole page if there are no sections
var sectioneditlinks = false; // if there are section edit links, we can safely show the lead section edit link
/* move section edit links */
var body = document.getElementById("bodyContent");
// we iterate through headers until we find a section header
for(var i=1; i<=6; i++) {
var h = body.getElementsByTagName('h'+i);
for(var j=0; j<h.length; j++) {
var span = h[j].getElementsByTagName('span');
for(var k=0; k<span.length; k++) {
if(span[k].className == "mw-headline") headings = true;
else if(span[k].className == "editsection") {
headings = true;
sectioneditlinks = true;
if(is_opera) { // Opera doesn't seem to like the class being changed on the fly
span[k].style.fontSize = "x-small";
span[k].style.fontWeight = "normal";
span[k].style.cssFloat = span[k].style.styleFloat = "none";
span[k].style.marginLeft = "0.5em";
span[k].style.verticalAlign = "baseline";
span[k].style.lineHeight = "1em";
}
span[k].className = "editsectionmoved";
span[k].parentNode.appendChild(document.createTextNode(" "));
span[k].parentNode.appendChild(span[k]); // move behind the heading title
}
}
}
}
/* add lead section edit link */
var edit = document.getElementById("ca-edit");
if(headings && !sectioneditlinks) return; // if sections are not editable, don't add
else if(!headings) {
// try to guess whether sections would be editable; don't add if
// 1) article is protected or otherwise uneditable
// 2) user is viewing page history, edit/move/delete interface, etc.
// 3) user is viewing a special page
// 4) user is viewing a diff, unless it's a diff to the current revision
// 5) user is viewing a permalink to a revision, unless it's the current revision
if(!edit || mw.config.get('wgAction') != "view" || document.location.href.match("/wiki/Speci%C3%A1lis:"))
return;
var diffMatch = document.location.href.match(/diff=([^&]*)/);
var diff = diffMatch ? diffMatch[1] : null;
var oldidMatch = document.location.href.match(/oldid=([^&]*)/);
var oldid = oldidMatch ? oldidMatch[1] : null;
if(oldid && diff) {
if(diff != mw.config.get('wgCurRevisionId') && !(diff == "prev" && oldid == mw.config.get('wgCurRevisionId'))) return;
} else if(oldid) {
if(oldid != mw.config.get('wgCurRevisionId')) return;
}
// covers most cases, "diff=next&oldid=<last before current>" is impossible to catch
}
var href = edit.firstChild.href + "§ion=0";
if(headings) href += "&editintro=MediaWiki:Editintro-section-0";
var title = document.getElementsByTagName('h1')[0];
if(!title || title.className != "firstHeading") return; // make sure this is the main title
var edit0 = document.createElement('span');
edit0.className = "editsectionmoved";
if(is_opera) {
edit0.style.fontSize = "x-small";
edit0.style.fontWeight = "normal";
edit0.style.marginLeft = "0.5em";
edit0.style.verticalAlign = "baseline";
edit0.style.lineHeight = "1em";
}
edit0.innerHTML = '[<a title="Bevezető szerkesztése" href="' + href + '">szerkesztés</a>]';
title.appendChild(document.createTextNode(" "));
title.appendChild(edit0);
}
addOnloadHook(moveSectionEditLinks);
}
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Mr.Z-man/refToolbar_2.0.js&action=raw&ctype=text/javascript&dontcountme=s;');
popupFixRedirs = true;
popupFixDabs = true;
function webcitebutton() {
mw.util.addPortletLink('p-cactions', 'javascript:webciteEverything()', "Web cite", "ca-websiteeverything", "Külső linkek tároltatása a Web Cite-tal");
}
$(webcitebutton);
function webciteEverything() {
for (var i in document.links) {
if (document.links[i].href.indexOf('wikipedia') == -1) {
if (document.links[i].href.indexOf('mediawiki.org') == -1) {
if (document.links[i].href.indexOf('wikimedia') == -1) {
if (document.links[i].href.indexOf('javascript:') == -1) {
if (document.links[i].href.indexOf('creativecommons.org') == -1) {
window.open('http://www.webcitation.org/archive?url='+escape(document.links[i].href)+'&email=bdamokos@gmail.com&returnxml=true' ); }
}}}}}
}