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 75: | Linia 75: | ||
$.showCustomModal('Narzędzia — ' + mw.config.get('wgPageName').split('/')[1], '<div class="input-group"><label>Powód:</label><input id="reason" type="text" maxlength="150" value="[[c:help:vandalism]]"> <span id="banReasonV" class="button">V</span> <span id="banReasonS" class="button">S</span> <span id="banReasonP" class="button">P</span> <span id="banReasonOB" class="button">OB</span></div><br/><div class="input-group"><label>Czas blokady:</label><input id="time" type="text" maxlength="150" value="2 weeks"> <span id="banTime12h" class="button">12h</span> <span id="banTime2w" class="button">2w</span> <span id="banTime3m" class="button">3m</span> <span id="banTimeInf" class="button">inf</span></div>', { |
$.showCustomModal('Narzędzia — ' + mw.config.get('wgPageName').split('/')[1], '<div class="input-group"><label>Powód:</label><input id="reason" type="text" maxlength="150" value="[[c:help:vandalism]]"> <span id="banReasonV" class="button">V</span> <span id="banReasonS" class="button">S</span> <span id="banReasonP" class="button">P</span> <span id="banReasonOB" class="button">OB</span></div><br/><div class="input-group"><label>Czas blokady:</label><input id="time" type="text" maxlength="150" value="2 weeks"> <span id="banTime12h" class="button">12h</span> <span id="banTime2w" class="button">2w</span> <span id="banTime3m" class="button">3m</span> <span id="banTimeInf" class="button">inf</span></div>', { |
||
id: 'tools', |
id: 'tools', |
||
width: |
width: 600, |
||
height: 750, |
|||
buttons: [{ |
buttons: [{ |
||
message: 'Cofnij wszystko', |
message: 'Cofnij wszystko', |
Wersja z 10:39, 3 lut 2016
//importy
importScript('User:Michał56/ostatnie zmiany.js');
importScript('User:Expert3222/RollbackAll.js');
importScript('MediaWiki:Gadget-myNotepad.js');
importScript('MediaWiki:Gadget-AjaxRC.js');
importScript('MediaWiki:Gadget-ReferencePopups.js');
importScript('MediaWiki:Gadget-AutoEd.js');
//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": ""
};
}
//fast delete 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',
// ...
]
} );
;(function($, mw) {
switch (mw.config.get('wgCanonicalSpecialPageName')) {
case "Contributions":
$('#contentSub a:nth-child(8)').after(' • <a id="nuke" href="http://nonsensopedia.wikia.com/wiki/Special:Nuke/' + mw.config.get('wgPageName').split('/')[1] + '">masowe usuwanie</a>');
break;
}
}) (this.jQuery, this.mediaWiki);
;(function($, mw) {
switch (mw.config.get('wgCanonicalSpecialPageName')) {
case "Contributions":
$('#contentSub a:nth-child(9)').after(' • <a href="#" id="contribs-tools">narzędzia</a>');
break;
}
}) (this.jQuery, this.mediaWiki);
;(function($, mw) {
$('#contribs-tools').click(function() {
$.showCustomModal('Narzędzia — ' + mw.config.get('wgPageName').split('/')[1], '<div class="input-group"><label>Powód:</label><input id="reason" type="text" maxlength="150" value="[[c:help:vandalism]]"> <span id="banReasonV" class="button">V</span> <span id="banReasonS" class="button">S</span> <span id="banReasonP" class="button">P</span> <span id="banReasonOB" class="button">OB</span></div><br/><div class="input-group"><label>Czas blokady:</label><input id="time" type="text" maxlength="150" value="2 weeks"> <span id="banTime12h" class="button">12h</span> <span id="banTime2w" class="button">2w</span> <span id="banTime3m" class="button">3m</span> <span id="banTimeInf" class="button">inf</span></div>', {
id: 'tools',
width: 600,
buttons: [{
message: 'Cofnij wszystko',
id: 'RollbackAllButton',
defaultButton: true,
handler: function() {
alert("test ~");
}
}]
});
});
}) (this.jQuery, this.mediaWiki);