Użytkownik:Michał56/common.js: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
M Znacznik: edytor źródłowy |
M Znacznik: edytor źródłowy |
||
Linia 1: | Linia 1: | ||
//szybki link do statów |
|||
importScript( "User:Bizzeebeever/scripts/patrol.js", "uncyclopedia" ); |
|||
//autor - Michał56 |
|||
if (mw.config.get('wgUserGroups').indexOf('sysop') + mw.config.get('wgUserGroups').indexOf('rollback')) { |
if (mw.config.get('wgUserGroups').indexOf('sysop') + mw.config.get('wgUserGroups').indexOf('rollback')) { |
||
main(); |
main(); |
||
Linia 9: | Linia 7: | ||
} |
} |
||
//szybki link do ukrywania rewertów |
|||
if (wgCanonicalSpecialPageName == 'Contributions') { |
|||
$('input[value=Szukaj]').click(function() { |
|||
var stan = document.getElementById('bot-reverts'); |
|||
if (stan.checked) { |
|||
main(); |
|||
} |
|||
}); |
|||
function main() { |
|||
var pagename = mw.config.get('wgPageName'); |
|||
$.get('/index.php?title=' + pagename + '&bot=1', function() { |
|||
location.reload(true); |
|||
}); |
|||
$('html, body').css({ |
|||
display: 'block', |
|||
verflow: 'hidden' |
|||
}); |
|||
} |
|||
} else { |
|||
return; |
|||
} |
|||
//dodatkowe przyciski w edytorze |
//dodatkowe przyciski w edytorze |
||
if (typeof (mwCustomEditButtons) != 'undefined') { |
if (typeof (mwCustomEditButtons) != 'undefined') { |
||
Linia 33: | Linia 53: | ||
}; |
}; |
||
} |
} |
||
//FastDelete buttons |
|||
window.fdButtons = []; |
window.fdButtons = []; |
||
Linia 52: | Linia 73: | ||
type: 'script', |
type: 'script', |
||
articles: [ |
articles: [ |
||
// ... |
|||
'u:dev:FastDelete/code.js', |
'u:dev:FastDelete/code.js', |
||
// ... |
|||
] |
] |
||
} ); |
} ); |
Wersja z 20:11, 21 mar 2016
//szybki link do statów
if (mw.config.get('wgUserGroups').indexOf('sysop') + mw.config.get('wgUserGroups').indexOf('rollback')) {
main();
}
function main() {
$('#p-cactions > .pBody > ul').append('<li id="ca-qs"><a href="/wiki/Nonsensopedia:Statystyki dzień po dniu?action=edit" id="ca-qs-link">Uzupełnij staty</a></li>');
}
//szybki link do ukrywania rewertów
if (wgCanonicalSpecialPageName == 'Contributions') {
$('input[value=Szukaj]').click(function() {
var stan = document.getElementById('bot-reverts');
if (stan.checked) {
main();
}
});
function main() {
var pagename = mw.config.get('wgPageName');
$.get('/index.php?title=' + pagename + '&bot=1', function() {
location.reload(true);
});
$('html, body').css({
display: 'block',
verflow: 'hidden'
});
}
} else {
return;
}
//dodatkowe przyciski w edytorze
if (typeof (mwCustomEditButtons) != 'undefined') {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/26/Button_latinas.png",
"speedTip": "Wstaw polskie cudzysłowy",
"tagOpen": "„",
"tagClose": "”",
"sampleText": ""
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://upload.wikimedia.org/wikipedia/commons/3/3f/Button_headline_-_2.png",
"speedTip": "Wstaw półpauzę",
"tagOpen": "–",
"tagClose": "",
"sampleText": ""
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://commons.wikimedia.org/wiki/Category:MediaWiki_edit_toolbar_formatting_buttons#/media/File:Pulsante_tmp.png",
"speedTip": "Wstaw podpis",
"tagOpen": "{{Michał56}} <nowiki>{{subst:#time:H:i, M d, Y|+1 hour}} (CET)</nowiki>",
"tagClose": "",
"sampleText": ""
};
}
//FastDelete buttons
window.fdButtons = [];
window.fdButtons.push(
{
summary: '[[Nonsensopedia:Bo tak|Bo tak]]',
label: 'Bo tak'
},
{
summary: '[[Nonsensopedia:Wandalizm|Wandalizm]]',
label: 'Wandalizm'
},
{
summary: '[[Nonsensopedia:Prywata|Prywata]]',
label: 'Prywata'
}
);
importArticles( {
type: 'script',
articles: [
'u:dev:FastDelete/code.js',
]
} );