Używacz:Szoltys/monobook.js

Ze Wikipedia

Pozōr: żeby ôbejzdrzeć zmiany po spamiyntaniu, może być potrzebne wysnŏżynie pamiyńci podryncznyj przeglōndarki.

  • Firefox / Safari: Przitrzim Shift przi klikaniu Ôdświyż terŏźnõ strōnã, abo naciś knefle Ctrl+F5 abo Ctrl+R (⌘-R na kōmputrze Mac)
  • Google Chrome: Naciś Ctrl-Shift-R (⌘-Shift-R na kōmputrze Mac)
  • Internet Explorer: Przitrzim Ctrl przi klikaniu Ôdświyż, abo naciś knefle Ctrl+F5
  • Opera: Przejdź do Myni → Sztelōnki (Opera → Preferyncyje w Mac), a potym Prywatność i bezpieczyństwo → Wysnŏż dane przeglōndaniŏ → Ôprōznij pamiyńć podryncznõ.
document.write('<script type="text/javascript" src="' 
             + 'http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Leafnode/LiveRC.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// User:Lupin/popups.js - please include this line

document.write('<script type="text/javascript" src="'

            + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
            + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

popupAdminLinks=true; popupDelay=0.1; popupFixRedirs=true; popupFixDabs=true; popupFixDabsSummary="Popups ujednoznacznił %s na %s"; popupRevertSummary="Popups przywrócił wersję %s"; popupFixRedirsSummary="Popups zmienił link z %s na %s";

window.addEditTopLinkDone = 1

//
// Add date and time to your monobook "personal menu" list at the very top of the page.
// Created by [[:en:User:Mathwiz2020]]

// Indicate where you would like the time to appear:
// 1 is first (before username), 2 is second (before talk link), ... 7 is last (after log out link)
insertBeforeNum = 0;

// Do NOT edit below this line unless you're experiened in javascript
insertBeforeArr = new Array("","pt-userpage","pt-mytalk","pt-preferences","pt-watchlist","pt-mycontris","pt-logout","");
insertBefore = insertBeforeArr[insertBeforeNum];

function makeTime()
{
  var li = document.createElement( 'li' );
  li.id = 'pt-time';

  var mySpan = document.createElement( 'span' );
  mySpan.appendChild( document.createTextNode( 'date and time' ) );

  li.appendChild( mySpan );

  if ( insertBefore )
  {
    var before = document.getElementById( insertBefore );
    before.appendChild( li, before );
  }
  else // append to end (right) of list
  {
    document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
  }

  getTime();
}

if      ( window.addEventListener ) window.addEventListener ( 'load', makeTime, false );
else if ( window.attachEvent      ) window.attachEvent      ( 'onload', makeTime      );

function getTime()
{
    var time    = new Date();
    var date    = time.getUTCDate();
    var months  = 'stycznia lutego marca kwietnia maja czerwca lipca sierpnia września października listopada grudnia'.split(' ');
        month   = months[time.getUTCMonth()];
    var year    = time.getUTCFullYear();
    var hours   = '0' + time.getUTCHours();
        hours   = hours.substr(hours.length-2, hours.length);
    var minutes = '0' + time.getUTCMinutes();
        minutes = minutes.substr(minutes.length-2, minutes.length);
    var seconds = '0' + time.getUTCSeconds();
        seconds = seconds.substr(seconds.length-2, seconds.length);
    var curTime = hours + ":" + minutes + ":" + seconds + ", " + date + " " + month + " " + year + " (UTC)";
    datePlace   = document.getElementById('pt-time').childNodes[0].childNodes[0];
                  datePlace.replaceData(0, datePlace.length, curTime);
    doTime      = window.setTimeout("getTime()", 1000);
}
//

// Revert tools by Lorian
function getElementsByClass(searchClass,node,tag) {
  // Function from http://www.dustindiaz.com/getelementsbyclass/
  var classElements = new Array();
  if ( node == null )
    node = document;
  if ( tag == null )
    tag = '*';
  var els = node.getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if ( pattern.test(els[i].className) ) {
      classElements[j] = els[i];
      j++;
    }
  }
  return classElements;
}

// _GET code from NoGray JS Library http://www.nogray.com/new_site/
var _GET = new Array();
var _uri = location.href;

var _temp_get_arr = _uri.substring(_uri.indexOf('?')+1, _uri.length).split("&");

var _temp_get_arr_1 = new Array();

for(_get_arr_i=0; _get_arr_i<_temp_get_arr.length; _get_arr_i++){
  _temp_get_arr_1 = _temp_get_arr[_get_arr_i].split("=");
  _GET[decodeURI(_temp_get_arr_1[0])] = decodeURI(_temp_get_arr_1[1]);
}

delete _uri; delete _temp_get_arr; delete _temp_get_arr_1;

function getMessage (where, user1, user2) {
  var message = prompt ('Jaką wiadomość chciałbyś zostawić ?', '');
  window.location = 'http://pl.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message;
}

$(function (){
  if (location.href.match(/diff=/)) {
    // Get username of submitter
    var user1 = getElementsByClass('diff-otitle',null,'td'); user1 = user1[0].getElementsByTagName('a')[2].innerHTML;
    var user2 = getElementsByClass('diff-ntitle',null,'td'); user2 = user2[0].getElementsByTagName('a')[2].innerHTML;
    document.getElementById('contentSub').innerHTML = '(<a href="http://pl.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&revert=1&user1='+user1+'&user2='+user2+'">Revert</a> | <a href="javascript:var message = getMessage(\'revert\', \''+user1+'\', \''+user2+'\');">Powód/Info</a>) (Ostrzeżenia: <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=1">testżart</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=2">test</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=3">test1</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=4">test3</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=5">test4</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=6">testP</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=7">blok</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=8">testNPA</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit&section=new&warn=9">testNPW</a>)';
  } else if (location.href.match(/revert=1/)) {
    document.getElementById('wpSummary').value = 'Przywrócono przedostatnią wersję, jej autor to [[Wikipedysta:'+_GET['user1']+'|'+_GET['user1']+']]. Autor wycofanej edycji to [[Specjalna:Contributions/'+_GET['user2']+'|'+_GET['user2']+']]'; 
    document.getElementById('editform').submit();
  } else if (location.href.match(/revert=2/)) {
    document.getElementById('wpSummary').value = 'Przywrócono przedostatnią wersję, jej autor to  [[Wikipedysta:'+_GET['user1']+'|'+_GET['user1']+']]. Autor wycofanej edycji to [[Specjalna:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] ('+_GET['message']+')';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=1/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';  
    document.getElementById('wpTextbox1').value = '{{sub'+'st:testżart}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=2/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';      
    document.getElementById('wpTextbox1').value = '{{sub'+'st:test}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=3/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:test1}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=4/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:test3}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=5/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:test4}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=6/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:testP}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=7/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Zasady blokowania|Zostałeś/aś zablokowany/a]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:zablokowany}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=8/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Prawa autorskie|Prawa autorskie w polskiej Wikipedii]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:testNPA}} ~~'+'~~';
    document.getElementById('editform').submit();
  } else if (location.href.match(/warn=9/)) {
    document.editform.wpSummary.value = '[[Wikipedia:Neutralny punkt widzenia|Neutralny punkt widzenia]]';
    document.getElementById('wpTextbox1').value = '{{sub'+'st:testNPW}} ~~'+'~~';
    document.getElementById('editform').submit();
    }
});

function InsertButtonsToToolBar()
{
//Komentarz
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png",
    "speedTip": "Dodaj ukryty komentarz",
    "tagOpen": "<!-- ",
    "tagClose": " -->",
    "sampleText": "Komentarz"}
//Kod
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/en/2/23/Button_code.png",
    "speedTip": "<code>",
    "tagOpen": "<code>",
    "tagClose": "</code>",
    "sampleText": "Kod"}
//Disambig
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/69/Disambig.png",
    "speedTip": "Disambig",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "disambig"}
//Witaj2
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/53/Crystal_Clear_app_error.png",
    "speedTip": "Witaj2",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "Witaj2|roo72"}
//testP
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/85/RomanP-01.png",
    "speedTip": "testP",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "testP"}
//testopis
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/89/Exquisite-khelpcenter.png",
    "speedTip": "testopis",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "testopis"}
//testNPA-rm
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b6/Copyright.png",
    "speedTip": "testNPA-rm",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "testNPA-rm"}
//testAd
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/97/Crystal_128_fonts.png",
    "speedTip": "testAd",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "testAd"}
//bezpodpisu
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/36/Nuvola_apps_email.png",
    "speedTip": "bezpodpisu",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "bezpodpisu"}
//dyskusjapodpis
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f8/Zeichen_314.png",
    "speedTip": "dyskusjapodpis",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "dyskusjapodpis"}
//topopraw
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f9/RomanP-01.png",
    "speedTip": "topopraw",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "topopraw"}
//anonim
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0e/RomanA-01.png",
    "speedTip": "anonim",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "anonim"}
//welcome
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b9/Nuvola_apps_edu_languages.png",
    "speedTip": "welcome",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "welcome"}
}
$( InsertButtonsToToolBar );

/*

Title: ReinDeel33t Script
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(11);
    labels[0] = 'Commons';
    labels[1] = 'BL';
    labels[2] = 'FU'    
    labels[3] = 'NPA';
    labels[4] = 'substub';
    labels[5] = 'zabawy';
    labels[6] = 'nieency';
    labels[7] = 'zbędne'
    labels[8] = 'reklama'  
    labels[9] = 'MechWiki'  
    labels[10] = 'wulg'   

    reasons = new Array(11);
    reasons[labels[0]] = 'jest na Commons - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[1]] = '[[Wikipedia:Zasady dołączania plików|brak licencji]] - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[2]] = '[[Wikipedia:Prawa autorskie/Fair use|Fair use]] - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[3]] = '[[Prawo autorskie|NPA]] - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[4]] = 'za mało na [[Wikipedia:Zalążek artykułu|stub]] - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[5]] = 'zabawy... - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[6]] = 'nieency - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]';
    reasons[labels[7]] = 'niepotrzebne - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]'
    reasons[labels[8]] = 'reklama - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]'
    reasons[labels[9]] = 'zabawy z mechanizmem Wiki - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]'
    reasons[labels[10]] = 'wulg. - [[Wikipedysta:TOR/Skrypty/ReinDeel33t|ReinDeel33t]]'

    needs_add_info = new Array(11);
    needs_add_info[labels[0]] = 1;
    needs_add_info[labels[1]] = 1;
    needs_add_info[labels[2]] = 1;
    needs_add_info[labels[3]] = 1;
    needs_add_info[labels[4]] = 1;
    needs_add_info[labels[5]] = 1;
    needs_add_info[labels[6]] = 1;
    needs_add_info[labels[7]] = 1;
    needs_add_info[labels[8]] = 1;
    needs_add_info[labels[9]] = 1;
    needs_add_info[labels[10]] = 1;
 
/* 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(' '));
    }

  }
}
}

function giveReason(msg) {
  document.getElementById('wpReason').setAttribute('value',reasons[msg]);
  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();
    }
  }
}
/* 

*/

 // Dołączenie skryptu ze strony: [[Wikipedysta:Leafnode/quickedit.js]]
 document.write('<script type="text/javascript" src="'+
 'http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Leafnode/quickedit.js\
 &action=raw&ctype=text/javascript&dontcountme=s"></script>');

 // Dołączenie skryptu ze strony: [[Wikipedysta:Leafnode/LiveRC.js]]
 document.write('<script type="text/javascript" src="'+
 'http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Leafnode/LiveRC.js\
 &action=raw&ctype=text/javascript&dontcountme=s"></script>');

 // Edycji tych osób nie sprawdzamy, lista nie jest pełna, nie obraź się jeżeli Cię na niej jeszcze nie ma
var nick_color = new Array (
        'Beau', 'nick_friend',
        'LidiaFourdraine', 'nick_friend',
        'Ziel', 'nick_friend',
        'ABX', 'nick_friend',
        'Masur', 'nick_friend',
        'Lajsikonik', 'nick_friend',
        'Kpjas', 'nick_friend',
        'DaKa', 'nick_friend'
);