User:Zabshk/heading-icons.js: Difference between revisions

m
Zabshk moved page User:Zabshk/vector.js to User:Zabshk/heading-icons.js without leaving a redirect: Move to script page
No edit summary
m (Zabshk moved page User:Zabshk/vector.js to User:Zabshk/heading-icons.js without leaving a redirect: Move to script page)
 
(2 intermediate revisions by the same user not shown)
Line 17:
'msg-semi-protection': 'Only autoconfirmed users can edit this page (semi protection).',
'msg-full-protection': 'Only administrators users can edit this page (full protection).',
'msg-other-protection': 'This page is protected on non-standard protection level.',
} );
Line 63 ⟶ 64:
/**
* Shows padlock in the right corner
* Wyświetlanie kłódki w prawym górnym rogu kiedy
* when page is protected
* strona jest zabezpieczona
*/
headingIconGadget.padlockIcon = function() {
// nano stroniepadlock głównejon niemain pokazujemy kłódkipage
if ( mw.config.get( 'wgTitle' ) == mw.config.get( 'wgMainPageTitle' ) ) {
return;
}
// brakno zabezpieczeńprotection?
var wgRestrictionEdit = mw.config.get( 'wgRestrictionEdit' );
if ( wgRestrictionEdit == null || wgRestrictionEdit.length < 1 || wgRestrictionEdit[0] == "" ) {
Line 78 ⟶ 79:
}
// wydrukprint?
if ( mw.util.getParamValue( 'printable' ) == 'yes' ) {
return;
Line 86 ⟶ 87:
if ( wgRestrictionEdit[0] == "autoconfirmed" ) {
img.src = "//upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Padlock-green.svg/22px-Padlock-green.svg.png";
img.title = mw.msg( 'msg-smallsemi-protection' );
} else if ( wgRestrictionEdit[0] == "editor" ) {
img.src = "//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Padlock-gold.svg/22px-Padlock-gold.svg.png";
img.title = mw.msg( 'msg-medium-protection' );
} else if ( wgRestrictionEdit[0] == "sysop" ) {
img.src = "//upload.wikimedia.org/wikipedia/commons/thumb/4/48/Padlock-red.svg/22px-Padlock-red.svg.png";
img.title = mw.msg( 'msg-highfull-protection' );
} else {
img.src = "//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Padlock-gold.svg/22px-Padlock-gold.svg.png";
img.title = mw.msg( 'msg-mediumother-protection' );
}
img.alt = "padlock";
0

edits