Szerkesztő:KovacsUr/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
- Edge: tartsd nyomva a Ctrl-t, és kattints a Frissítés gombra, vagy nyomj Ctrl–F5-öt
/* <nowiki> */
/* Fettelő */
var fettelo_bekapcs = false;
var elejere_ha_nincs_benne = true;
var szerk_link_se = false;
document.write('<script type="text/javascript" src="'
+ 'http://hu.wiki.x.io/w/index.php?title=User:KovacsUr/fettelo-debug.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* Adminsegéd */
document.write('<script type="text/javascript" src="'
+ 'http://hu.wiki.x.io/w/index.php?title=User:KovacsUr/adminseged.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* wikEd */
wikEdText = {
'wikEdReferencesSection': '\n== Hivatkozások ==\n\n<references \/>\n'
}
var wikEdLoadRegExTypoFix = true;
var wikEdRegExTypoFixSrc = 'http://hu.wiki.x.io/w/index.php?title=User:KovacsUr/wikEdTypoFix-hu.js&action=raw&ctype=text/javascript&dontcountme=s';
// saját gombok (id, class, popup title, image src, width, height, alt text, onClick and parameters)
var wikEdButton = [];
wikEdButton[100] = ['wikEdForma', 'wikEdButton', 'Formázandó sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/3/33/F-Am%C3%A9ricas.png', '16', '16', 'forma', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloForma);' ];
wikEdButton[101] = ['wikEdKorr', 'wikEdButton', 'Korrektúrázandó sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/a/a4/Crystal_Clear_app_klipper.png', '16', '16', 'korr', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloKorr);' ];
wikEdButton[102] = ['wikEdIdez', 'wikEdButton', 'Írógép-idézőjelek cseréje nyomdaiakra', 'http://up.wiki.x.io/wikipedia/commons/2/23/Quotes-Lithuanian.png', '16', '16', 'idézőjelek', 'javascript:WikEdEditButton(this, this.id, null, IdezojelGombKezelo);' ];
wikEdButton[103] = ['wikEdTorl', 'wikEdButton', 'Törlendő sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/6/60/Hangmans_Noose.jpg', '16', '16', 'Törl', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTorl);' ];
wikEdButton[104] = ['wikEdAz', 'wikEdButton', 'Azonnali sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/f/f6/Anarchist_s.png', '16', '16', 'Azo', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloAz);' ];
wikEdButton[105] = ['wikEdCsonk', 'wikEdButton', 'Csonk- sablon beillesztése/kivétele', 'ideaképlinkjét', '16', '16', 'Cs', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloCsonk);' ];
wikEdButton[106] = ['wikEdForr', 'wikEdButton', 'Forrás sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/3/30/Question.png', '16', '16', 'forrás?', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloForr);' ];
wikEdButton[107] = ['wikEdNincs', 'wikEdButton', 'Nincs forrás sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/c/c2/Ideology_Icon.png', '16', '16', 'nincs forrás', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloNincs);' ];
wikEdButton[108] = ['wikEdJog', 'wikEdButton', 'Jogsértő sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/5/53/Copyright_crystal_orange.png', '19', '19', 'jogsértő', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloJog);' ];
wikEdButton[110] = ['wikEdTeszt', 'wikEdButton', 'Teszt sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/6/66/RomanT-01.png', '16', '16', 'Teszt', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTeszt);' ];
wikEdButton[111] = ['wikEdTeszt2', 'wikEdButton', 'Teszt2 sablon beillesztése/kivétele', 'ideaképlinkjét', '16', '16', 'T2', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTeszt2);' ];
wikEdButton[112] = ['wikEdTeszt3', 'wikEdButton', 'Teszt3 sablon beillesztése/kivétele', 'ideaképlinkjét', '16', '16', 'T3', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTeszt3);' ];
wikEdButton[113] = ['wikEdTeszt4', 'wikEdButton', 'Teszt4 sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/6/63/Stop_hand_rugen.png', '16', '16', 'stop!', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTeszt4);' ];
wikEdButton[114] = ['wikEdTeszt5', 'wikEdButton', 'Utolsó figyelmeztetés sablon beillesztése/kivétele', 'ideaképlinkjét', '16', '16', 'utolsó!', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloTeszt5);' ];
wikEdButton[115] = ['wikEdM', 'wikEdButton', 'Maradjon sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/c/c7/Support_vote_button.png', '16', '16', 'maradjon', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloM);' ];
wikEdButton[116] = ['wikEdT', 'wikEdButton', 'Törlendő sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/6/6e/Oppose_vote_button.png', '16', '16', 'törlendő', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloT);' ];
wikEdButton[117] = ['wikEdMj', 'wikEdButton', 'Megjegyzés sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/7/74/Button_comment.png', '16', '16', 'megjegyzés', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloMj);' ];
wikEdButton[118] = ['wikEdUdv', 'wikEdButton', 'Üdvözlés sablon beillesztése/kivétele', 'http://up.wiki.x.io/wikipedia/commons/e/e5/Symbole-hi.png', '16', '16', 'Üdv!', 'javascript:WikEdEditButton(this, this.id, null, SablonGombKezeloUdv);' ];
// saját eszközsor (id outer, class outer, id inner, class inner, height, grip title, button numbers)
var wikEdButtonBar = [];
wikEdButtonBar['custom1'] = ['wikEdButtonBarCustom1', 'wikEdButtonBarCustom1', 'wikEdButtonsCustom1', 'wikEdButtonsCustom1', 44, 'Saját gombok', [100,101,102,103,104,105,106,107,108,'br',110,111,112,113,114,115,116,117,118] ];
// eseménykezelők
// Írógép-idézőjelek cseréje nyomdaiakra (ha van kijelölés, csak a kijelölt szövegben, egyébként a teljes szövegben)
function IdezojelGombKezelo(obj) {
WikEdGetText(obj, 'selection', true);
if (obj.selection.plain != '') {
obj.changed = obj.selection;
}
else {
WikEdGetText(obj, 'whole', true);
obj.changed = obj.whole;
}
obj.changed.plain = obj.changed.plain.replace(new RegExp("\"([^\"]*)\"", "mg"), "„$1”");
return;
}
// {{forma}} sablon beszúrása/kivétele
function SablonGombKezeloForma(obj) {
return SablonGombKezelo(obj, "forma");
}
// {{csonk}} sablon beszúrása/kivétele
function SablonGombKezeloCsonk(obj) {
return SablonGombKezelo(obj, "csonk-");
}
// {{korr}} sablon beszúrása/kivétele
function SablonGombKezeloKorr(obj) {
return SablonGombKezelo(obj, "korr");
}
// {{subst:teszt}} sablon beszúrása/kivétele
function SablonGombKezeloTeszt(obj) {
return SablonGombKezelo(obj, "subst:teszt", true);
}
// {{subst:teszt2}} sablon beszúrása/kivétele
function SablonGombKezeloTeszt2(obj) {
return SablonGombKezelo(obj, "subst:teszt2", true);
}
// {{subst:teszt3}} sablon beszúrása/kivétele
function SablonGombKezeloTeszt3(obj) {
return SablonGombKezelo(obj, "subst:teszt3", true);
}
// {{subst:teszt4}} sablon beszúrása/kivétele
function SablonGombKezeloTeszt4(obj) {
return SablonGombKezelo(obj, "subst:teszt4", true);
}
// {{subst:teszt-rögtön}} sablon beszúrása/kivétele
function SablonGombKezeloTeszt5(obj) {
return SablonGombKezelo(obj, "subst:teszt-rögtön", true);
}
// {{azonnali}} sablon beszúrása/kivétele
function SablonGombKezeloAz(obj) {
return SablonGombKezelo(obj, "azonnali|teszt");
}
// {{törlés}} sablon beszúrása/kivétele
function SablonGombKezeloTorl(obj) {
return SablonGombKezelo(obj, "törlés");
}
// {{jogsértő}} sablon beszúrása/kivétele
function SablonGombKezeloJog(obj) {
return SablonGombKezelo(obj, "jogsértő|link");
}
// {{Törlendő}} beszúrása/kivétele
function SablonGombKezeloT(obj) {
return SablonGombKezelo(obj, "t");
}
// {{Maradjon}} beszúrása/kivétele
function SablonGombKezeloM(obj) {
return SablonGombKezelo(obj, "m");
}
// {{Megjegyzés}} beszúrása/kivétele
function SablonGombKezeloMj(obj) {
return SablonGombKezelo(obj, "mj");
}
// {{Subst:Üdv}} beszúrása/kivétele
function SablonGombKezeloUdv(obj) {
return SablonGombKezelo(obj, "subst:Üdvözlet|user=~~~~");
}
// {{forr}} beszúrása/kivétele
function SablonGombKezeloForr(obj) {
return SablonGombKezelo(obj, "forr");
}
// {{nincs forrás}} beszúrása/kivétele
function SablonGombKezeloNincs(obj) {
return SablonGombKezelo(obj, "nincs forrás");
}
// Segédfüggvény a sablonokkal foglalkozó gombokhoz
function SablonGombKezelo(obj, sablon, alair) {
WikEdGetText(obj, 'selection, cursor');
if (obj.selection.plain != '') {
obj.changed = obj.selection;
}
else {
obj.changed = obj.cursor;
}
// ha volt már, vegyük ki
if ( new RegExp("\{\{" + sablon + "\}\}" + (alair ? " ~~~~ " : ""), "i").test(obj.changed.plain) ) {
obj.changed.plain = obj.changed.plain.replace(new RegExp("\{\{" + sablon + "\}\}" + (alair ? " ~~~~ " : ""), "gi"), '');
}
// egyébként tegyük be
else {
obj.changed.plain = "{{" + sablon + "}}" + (alair ? " ~~~~ " : "") + obj.changed.plain;
}
// kiválasztás maradjon
obj.changed.keepSel = true;
return;
}
document.write('<script type="text/javascript" src="'
+ 'http://en.wiki.x.io/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* </nowiki> */