Użytkownik:Pandecybel/monobook.js: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
Pandecybel (dyskusja • edycje) |
M (Wikia przeniósł stronę Użytkownik:Gudyś/monobook.js do Użytkownik:Pandecybel/monobook.js: Automatyczne przeniesienie stron użytkownika po zmianie nazwy konta z „Gudyś” na „Pandecybel”) |
||
(Nie pokazano 5 wersji utworzonych przez jednego użytkownika) | |||
Linia 1: | Linia 1: | ||
// QuickEK script by [[:pl:User:ChP94]] |
|||
{{ek|zbędne}} |
|||
// based on quickimgdelete.js script written by [[:en:User:Howcheng]] |
|||
// [http://nonsensopedia.wikia.com/index.php?title=U%C5%BCytkownik:Szoferka/monobook.js&action=purge purge] |
|||
// Released under the [http://www.gnu.org/licenses/gpl.txt GNU Public License (GPL)] |
|||
// <pre><nowiki> |
|||
// Oryginalna wersja [[wikipedia:pl:Wikipedia:Narzędzia/Navigation popups|Popups]]: [[wikipedia:en:User:Lupin/popups.js]] |
|||
var quickek_autosave = true; |
|||
// Proszę zachować powyższe informacje. |
|||
// document.write('<script type="text/javascript" src=" \ |
|||
// http://nonsensopedia.wikia.com/index.php?title=Użytkownik:Michalwadas/NP.js \ |
|||
// &action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
// From [[en:User:Lupin/autoedit.js]] |
|||
// |
|||
function getParamValue(paramName) { |
|||
// Ustawienia |
|||
var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)'); |
|||
// popupDelay=1; // opóźnienie w sekundach |
|||
var h=document.location; |
|||
// popupFixRedirs=true; // naprawianie linków do przekierowań |
|||
var m=cmdRe.exec(h); |
|||
// popupFixDabs=true; // naprawianie linków do stron ujednoznaczniających |
|||
if (m) { |
|||
// popupRevertSummaryPrompt=true; // możliwość zmiany tekstu przy revertowaniu |
|||
try { |
|||
// Dołączenie skryptu ze strony: [[Wikipedysta:Nux/hideSidebar.js]] |
|||
return decodeURIComponent(m[1]); |
|||
// document.write('<script type="text/javascript" src=" \ |
|||
} catch (someError) {} |
|||
// http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Nux/hideSidebar.js \ |
|||
// &action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
/* <pre> |
|||
Title: ReinDeel33t Scirpt |
|||
Version: 0.1.1b (15:00 10.01.2006) |
|||
Author: Łukasz "TOR" Garczewski <tor@oak.pl>, [[pl:User:TOR]] |
|||
License: GFDL, GPL, CC-by (choose one ;)) |
|||
Note: |
|||
en: This script was written with the invaluable help of Peter-Paul Koch's |
|||
javascript tutorials found at his homepage, QuirksMode <http://www.quirksmode.org/>. |
|||
If you like what I've done here, send him some happy thoughts. ;) |
|||
pl: Ten skrypt został napisany dzięki nieocenionej pomocy tutoriali |
|||
Petera-Paula Kocha, które znajduja sie na jego stronie domowej, |
|||
QuirksMode <http://www.quirksmode.org/>. |
|||
Jesli podoba ci sie to co tutaj stworzylem, wyslij mu troche cieplych mysli. ;) |
|||
Disclaimer: |
|||
en: This script is under heavy development. I cannot guarantee anything. |
|||
I can't even guarantee it's a script. ;) Use at your own risk. |
|||
pl: Ten skrypt jest obecnie w fazie bardzo rozwojowej. Nie gwaratunje niczego. |
|||
Nie gwarantuje nawet, ze to jest skrypt. ;) Uzywasz na wlasne ryzyko. |
|||
*/ |
|||
function setupRightClickEdit() { |
|||
if (document.getElementById) { |
|||
if (document.getElementById('deleteconfirm')) { |
|||
/* FEATURE: Hardcore Mode |
|||
changing the value of del_hardcore_mode to 1 will cause the script |
|||
to automatically submit the form if needs_add_info = 0 |
|||
be *sure* you know what you're doing *before* you enable this */ |
|||
del_hardcore_mode = 1; |
|||
target = document.getElementById('deleteconfirm').childNodes[1].childNodes[1].firstChild; |
|||
var temp = document.createElement('TD'); |
|||
target.appendChild(temp); |
|||
var workspace = target.childNodes[5]; |
|||
workspace.setAttribute('rowspan','2'); |
|||
workspace.setAttribute('style','vertical-align: top'); |
|||
/* OPTIONS section start */ |
|||
labels = new Array(25); |
|||
labels[0] = 'prywata'; |
|||
labels[1] = 'bełkot'; |
|||
labels[2] = 'agitka'; |
|||
labels[3] = 'google'; |
|||
labels[4] = 'nnnw'; |
|||
labels[5] = 'celebrities'; |
|||
labels[6] = 'sdu24'; |
|||
labels[7] = 'sdu'; |
|||
labels[8] = 'woda'; |
|||
labels[9] = 'wszystko'; |
|||
labels[10] = 'nic'; |
|||
labels[11] = 'wulg'; |
|||
labels[12] = 'grafikac'; |
|||
labels[13] = 'grafikanc'; |
|||
labels[14] = 'malo'; |
|||
labels[15] = 'moderacja'; |
|||
labels[16] = 'przypadkowe'; |
|||
labels[17] = 'wandalizm'; |
|||
labels[18] = 'spam'; |
|||
labels[19] = 'jednak'; |
|||
labels[20] = 'offtopic'; |
|||
labels[21] = 'worek'; |
|||
labels[22] = 'brzytwa'; |
|||
labels[23] = 'stare'; |
|||
labels[24] = 'nieency'; |
|||
reasons = new Array(25); |
|||
reasons[labels[0]] = '[[Nonsensopedia:Prywata|prywata]]'; |
|||
reasons[labels[1]] = '[[Nonsensopedia:Bełkot|bełkot]]'; |
|||
reasons[labels[2]] = '[[Nonsensopedia:Agitka|agitka]]'; |
|||
reasons[labels[3]] = '[[Nonsensopedia:Googlowalność|nic w Google]]'; |
|||
reasons[labels[4]] = '[[Nonsensopedia:Nikt nic nie wie|nikt nic nie wie]]'; |
|||
reasons[labels[5]] = '[[Nonsensopedia:Celebrities|celebrities]]'; |
|||
reasons[labels[6]] = 'wynik SDU, tryb 24 h'; |
|||
reasons[labels[7]] = 'wynik SDU'; |
|||
reasons[labels[8]] = '[[Nonsensopedia:Lanie wody|lanie wody]]'; |
|||
reasons[labels[9]] = '[[Nonsensopedia:Powody usuwania haseł|wszystko co najgorsze]]'; |
|||
reasons[labels[10]] = 'nic'; |
|||
reasons[labels[11]] = 'wulg.'; |
|||
reasons[labels[12]] = '[[Użytkownik:Szoferka/powody działań#Brak licencji po monicie|c]]'; |
|||
reasons[labels[13]] = '[[Użytkownik:Szoferka/powody działań#Nieużywany copyright|nc]]'; |
|||
reasons[labels[14]] = 'mało'; |
|||
reasons[labels[15]] = 'strona usunięta [[Nonsensopedia:Moderacja|decyzją moderatora]]'; |
|||
reasons[labels[16]] = 'przypadkowe znaki'; |
|||
reasons[labels[17]] = '[[Nonsensopedia:Wandalizm|wandalizm]]'; |
|||
reasons[labels[18]] = '[[Nonsensopedia:Spam|spam]]'; |
|||
reasons[labels[19]] = 'jednak nie'; |
|||
reasons[labels[20]] = 'offtopic'; |
|||
reasons[labels[21]] = '[[Nonsensopedia:Jak nie tworzyć linków|worek linków]]'; |
|||
reasons[labels[22]] = '[[Nonsensopedia:Brzytwa Ockhama|brzytwa Ockhama]]'; |
|||
reasons[labels[23]] = 'stare'; |
|||
reasons[labels[24]] = '[[Nonsensopedia:Encyklopedyczność|nieency]]'; |
|||
needs_add_info = new Array(25); |
|||
needs_add_info[labels[0]] = 0; |
|||
needs_add_info[labels[1]] = 0; |
|||
needs_add_info[labels[2]] = 0; |
|||
needs_add_info[labels[3]] = 0; |
|||
needs_add_info[labels[4]] = 0; |
|||
needs_add_info[labels[5]] = 0; |
|||
needs_add_info[labels[6]] = 0; |
|||
needs_add_info[labels[7]] = 0; |
|||
needs_add_info[labels[8]] = 0; |
|||
needs_add_info[labels[9]] = 0; |
|||
needs_add_info[labels[10]] = 0; |
|||
needs_add_info[labels[11]] = 0; |
|||
needs_add_info[labels[12]] = 0; |
|||
needs_add_info[labels[13]] = 0; |
|||
needs_add_info[labels[14]] = 0; |
|||
needs_add_info[labels[15]] = 0; |
|||
needs_add_info[labels[16]] = 0; |
|||
needs_add_info[labels[17]] = 0; |
|||
needs_add_info[labels[18]] = 0; |
|||
needs_add_info[labels[19]] = 0; |
|||
needs_add_info[labels[20]] = 0; |
|||
needs_add_info[labels[21]] = 0; |
|||
needs_add_info[labels[22]] = 0; |
|||
needs_add_info[labels[23]] = 0; |
|||
needs_add_info[labels[24]] = 0; |
|||
/* OPTIONS section end */ |
|||
for (i=0; ((i+1) <= reasons.length); i++) { |
|||
workspace.appendChild(document.createElement('A')); |
|||
workspace.childNodes[(2 * i)].setAttribute('href','javascript:giveReason("' + labels[i] + '")'); |
|||
workspace.childNodes[(2 * i)].appendChild(document.createTextNode(labels[i])); |
|||
workspace.appendChild(document.createTextNode(' ')); |
|||
} |
|||
} |
} |
||
return null; |
|||
} |
} |
||
function quickek_ekIt () { |
|||
var reason = prompt("Dlaczego chcesz zEKować ten art?", ''); |
|||
if((reason) && (reason != "")) { |
|||
var title = encodeURIComponent(wgPageName); |
|||
window.location.href= "http://nonsensopedia.wikia.com/index.php?title" + title + "&action=edit&fakeaction=quickek&reason=" + encodeURIComponent(reason); |
|||
} |
|||
} |
} |
||
function |
function quickek_fastEk () { |
||
var title = encodeURIComponent(wgPageName); |
|||
document.getElementById('wpReason').setAttribute('value',reasons[msg]); |
|||
window.location.href= "http://nonsensopedia.wikia.com/index.php?title=" + title + "&action=edit&fakeaction=fastek"; |
|||
if (needs_add_info[msg]) { |
|||
document.getElementById('wpReason').focus(); |
|||
} |
|||
else { |
|||
if (del_hardcore_mode == 1) { |
|||
document.getElementById('deleteconfirm').submit(); |
|||
} |
|||
else { |
|||
target.parentNode.childNodes[2].childNodes[3].childNodes[1].focus(); |
|||
} |
|||
} |
|||
} |
} |
||
function quickek_onload() { |
|||
//**************************************************************************************************************** |
|||
if (document.getElementById('ca-edit') == null) // not editable by non-admin |
|||
function blockreasons() { |
|||
return; |
|||
if(!document.getElementById('ipbreason-dropdown-js')) return; |
|||
addPortletLink('p-tb', 'javascript:quickek_fastEk()', "Błyskawiczne kasowanko", 'fast-ek', "Zgłoś artykuł do ekspresowego kasowanka bez podawania powodu"); |
|||
var reasondiv = document.getElementById('ipbreason-dropdown-js'); |
|||
addPortletLink('p-tb', 'javascript:quickek_ekIt()', "Ekspresowe kasowanko", 'quick-ek', "Zgłoś artykuł do ekspresowego kasowanka"); |
|||
var reasons = document.getElementById('ipbreason-dropdown-js').firstChild.nodeValue.split('\n'); |
|||
var |
var fakeaction = getParamValue('fakeaction'); |
||
if(fakeaction=="quickek") { |
|||
selsel.setAttribute('onchange','blockreasonchange();'); |
|||
var reason = decodeURIComponent(getParamValue('reason')); |
|||
selsel.setAttribute('id','blockreasonsel'); |
|||
editformval = document.editform.wpTextbox1.value; |
|||
if((editformval) && (editformval != "") && !(editformval.match("{{ek")) && (reason) && (reason != "")) { |
|||
firstop.appendChild(document.createTextNode('Powody blokad')); |
|||
editformval = "{{ek|1="+reason+"}}\n" + editformval; |
|||
selsel.appendChild(firstop); |
|||
document.editform.wpTextbox1.value = editformval; |
|||
document.editform.wpSummary.value = "[[Kategoria:EK" + "|ek]], powód: " + reason; |
|||
var groupop = new Array(); var gpn = 0; |
|||
if(quickek_autosave) { document.editform.wpSave.click(); } |
|||
var op = new Array(); var opn = 0; |
|||
for(var i=0;i<reasons.length;i++) { |
|||
if(reasons[i].substring(0,1)=='*') { |
|||
if(reasons[i].substring(0,2)=='**') { |
|||
op[opn] = document.createElement('option'); |
|||
op[opn].setAttribute('value',reasons[i].substring(2)); |
|||
op[opn].appendChild(document.createTextNode(reasons[i].substring(2))); |
|||
groupop[gpn].appendChild(op[opn]); |
|||
opn++; |
|||
} else { |
|||
if(groupop[gpn]) selsel.appendChild(groupop[gpn]) |
|||
gpn++; |
|||
groupop[gpn] = document.createElement('optgroup'); |
|||
groupop[gpn].setAttribute('label',reasons[i].substring(1)); |
|||
} |
|||
} |
} |
||
} |
} |
||
else if(fakeaction=="fastek") { |
|||
selsel.appendChild(groupop[gpn]); |
|||
editformval = document.editform.wpTextbox1.value; |
|||
if((editformval) && (editformval != "") && !(editformval.match("{{ek"))) { |
|||
var reasonparent = document.getElementById('blockip').wpBlockReason.parentNode; |
|||
editformval = "{{ek" +"}}\n" + editformval; |
|||
reasonparent.appendChild(document.createElement('br')); |
|||
document.editform.wpTextbox1.value = editformval; |
|||
reasonparent.appendChild(selsel); |
|||
document.editform.wpSummary.value = "[[Kategoria:EK" + "|ek]]"; |
|||
if(quickek_autosave) { document.editform.wpSave.click(); } |
|||
} |
|||
} |
|||
} |
} |
||
if(wgPageName=='Specjalna:Blockip') addOnloadHook(blockreasons); |
|||
addOnloadHook(quickek_onload); |
|||
//</nowiki></pre> |
|||
function blockreasonchange() { |
|||
var selsel = document.getElementById('blockreasonsel'); |
|||
var reasonbox = document.getElementById('blockip').wpBlockReason; |
|||
if(selsel.selectedIndex == 0) return |
|||
reasonbox.value = selsel.options[selsel.selectedIndex].value; |
|||
} |
|||
//**************************************************************************************************************** |
|||
/* </pre> */ |
Aktualna wersja na dzień 07:35, 10 lip 2017
// QuickEK script by [[:pl:User:ChP94]]
// based on quickimgdelete.js script written by [[:en:User:Howcheng]]
// Released under the [http://www.gnu.org/licenses/gpl.txt GNU Public License (GPL)]
// <pre><nowiki>
var quickek_autosave = true;
// From [[en:User:Lupin/autoedit.js]]
function getParamValue(paramName) {
var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
var h=document.location;
var m=cmdRe.exec(h);
if (m) {
try {
return decodeURIComponent(m[1]);
} catch (someError) {}
}
return null;
}
function quickek_ekIt () {
var reason = prompt("Dlaczego chcesz zEKować ten art?", '');
if((reason) && (reason != "")) {
var title = encodeURIComponent(wgPageName);
window.location.href= "http://nonsensopedia.wikia.com/index.php?title" + title + "&action=edit&fakeaction=quickek&reason=" + encodeURIComponent(reason);
}
}
function quickek_fastEk () {
var title = encodeURIComponent(wgPageName);
window.location.href= "http://nonsensopedia.wikia.com/index.php?title=" + title + "&action=edit&fakeaction=fastek";
}
function quickek_onload() {
if (document.getElementById('ca-edit') == null) // not editable by non-admin
return;
addPortletLink('p-tb', 'javascript:quickek_fastEk()', "Błyskawiczne kasowanko", 'fast-ek', "Zgłoś artykuł do ekspresowego kasowanka bez podawania powodu");
addPortletLink('p-tb', 'javascript:quickek_ekIt()', "Ekspresowe kasowanko", 'quick-ek', "Zgłoś artykuł do ekspresowego kasowanka");
var fakeaction = getParamValue('fakeaction');
if(fakeaction=="quickek") {
var reason = decodeURIComponent(getParamValue('reason'));
editformval = document.editform.wpTextbox1.value;
if((editformval) && (editformval != "") && !(editformval.match("{{ek")) && (reason) && (reason != "")) {
editformval = "{{ek|1="+reason+"}}\n" + editformval;
document.editform.wpTextbox1.value = editformval;
document.editform.wpSummary.value = "[[Kategoria:EK" + "|ek]], powód: " + reason;
if(quickek_autosave) { document.editform.wpSave.click(); }
}
}
else if(fakeaction=="fastek") {
editformval = document.editform.wpTextbox1.value;
if((editformval) && (editformval != "") && !(editformval.match("{{ek"))) {
editformval = "{{ek" +"}}\n" + editformval;
document.editform.wpTextbox1.value = editformval;
document.editform.wpSummary.value = "[[Kategoria:EK" + "|ek]]";
if(quickek_autosave) { document.editform.wpSave.click(); }
}
}
}
addOnloadHook(quickek_onload);
//</nowiki></pre>