MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 53: | Line 53: | ||
'.vector-page-titlebar .mw-protection-indicator' | '.vector-page-titlebar .mw-protection-indicator' | ||
).remove(); | ).remove(); | ||
}); | |||
/* Sadece "Living people" kategorisi olan sayfalarda BLP şablonunu göster */ | |||
$(function() { | |||
var action = mw.config.get('wgAction'); | |||
if ( action === 'edit' || action === 'submit' ) { | |||
var categories = mw.config.get('wgCategories'); | |||
// Kategori listesinde "Living people" olup olmadığını kontrol eder | |||
if ( categories && categories.indexOf('Living people') !== -1 ) { | |||
// Şablonu sayfanın en üstüne ekler | |||
$('#mw-content-text').prepend('<div class="blp-notice-container">{{BLP editnotice}}</div>'); | |||
} | |||
} | |||
}); | }); | ||