MediaWiki:Vector.js: Difference between revisions
Appearance
No edit summary Tag: Reverted |
No edit summary Tags: Manual revert Reverted |
||
| Line 1: | Line 1: | ||
/* All JavaScript here will be loaded for users of the Vector skin */ | /* All JavaScript here will be loaded for users of the Vector skin */ | ||
$(document).ready(function() { | |||
// Change the maximum depth of the table of contents | |||
mw.hook('wikipage.content').add(function() { | |||
// Adjust the depth value as needed | |||
mw.util.addCSS('.toclimit-3 .toclevel-4, .toclimit-3 .toclevel-5, .toclimit-3 .toclevel-6, .toclimit-3 .toclevel-7, .toclimit-3 .toclevel-8 { display: none; }'); | |||
$('#toc').addClass('toclimit-3'); | |||
}); | |||
}); | |||
Revision as of 10:10, 5 April 2024
/* All JavaScript here will be loaded for users of the Vector skin */
$(document).ready(function() {
// Change the maximum depth of the table of contents
mw.hook('wikipage.content').add(function() {
// Adjust the depth value as needed
mw.util.addCSS('.toclimit-3 .toclevel-4, .toclimit-3 .toclevel-5, .toclimit-3 .toclevel-6, .toclimit-3 .toclevel-7, .toclimit-3 .toclevel-8 { display: none; }');
$('#toc').addClass('toclimit-3');
});
});