Wikipedysta:Adziura/monobook.js
Z Wikipedii
Uwaga: po zapisaniu zmian musisz zaktualizować pamięć podręczną (cache) przeglądarki: Mozilla / Firefox: wciśnij Reload (lub CTRL+R), IE / Opera: CTRL+F5, Safari: CMD+R, Konqueror CTRL+R.
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>'); document.write('<scr'+'ipt type="text/javascript"' + 'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:JePe/recentrevisionsbox.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>'); // Dołączenie skryptu ze strony: [[Wikipedysta:Nux/hideSidebar.js]] document.write('<script type="text/javascript" src="'+ 'http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Nux/hideSidebar.js\ &action=raw&ctype=text/javascript&dontcountme=s"></script>'); // 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>'); var qeEnabled = true; // Activate Script? var qeEnableSection0 = true; // Enable QuickEdit link for section 0 (introduction)? var qeEnableAccessKeys = false; // Activate access keys? var qeTextboxHeight = 20; // Height of the textbox var qeEnableSpecialChars = false; // 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; } addOnloadHook(function (){ if (location.href.match(/diff=/)) { // Get username of submitter var user1h = getElementsByClass('diff-otitle',null,'td'); user1 = user1h[0].getElementsByTagName('a')[2].innerHTML; var user2h = getElementsByClass('diff-ntitle',null,'td'); user2 = user2h[0].getElementsByTagName('a')[3].innerHTML; if (user2 == 'Dyskusja') { user2 = user2h[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§ion=new&warn=1">testżart</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=2">test</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=3">wulg.</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=4">nonsens</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=5">niszcz.</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=l">wikikod</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=7">blok</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=8">testNPA</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=9">testNPW</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=s">spam</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=6">pierwsze i ost. ostrzeżenie</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=k">piszemy dla Ciebie</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=ki">nie znajdziesz...</a> | <a href="http://pl.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=zabawy">nie baw się</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=s/)) { document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]'; document.getElementById('wpTextbox1').value = '{{sub'+'st:spam}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=ki/)) { document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]'; document.getElementById('wpTextbox1').value = '{{sub'+'st:TestKI}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=k/)) { document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]'; document.getElementById('wpTextbox1').value = '{{sub'+'st:TestK}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=l/)) { document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]'; document.getElementById('wpTextbox1').value = '{{sub'+'st:TestL}} ~~'+'~~'; 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(); } else if (location.href.match(/warn=zabawy/)) { document.editform.wpSummary.value = '[[Wikipedia:Wandalizm|Wandalizm]]'; document.getElementById('wpTextbox1').value = '{{sub'+'st:testPE}} ~~'+'~~'; document.getElementById('editform').submit(); } });