MediaWiki:Gadget-FlowthreadTOC.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= (创建页面,内容为“$(function() { if ($('#toc')[0] && mw.config.exists('wgFlowThreadConfig')) { //同时存在Flowthread评论栏和目录的页面的目录添加Flowthread评论…”) |
imported>=海豚= 无编辑摘要 |
||
第1行: | 第1行: | ||
$(function() { | $(function() { | ||
if ($('#toc')[0] && mw.config.exists('wgFlowThreadConfig')) { //同时存在Flowthread评论栏和目录的页面 | if ($('#toc')[0] && mw.config.exists('wgFlowThreadConfig')) { //同时存在Flowthread评论栏和目录的页面 ,在 目录添加Flowthread评论栏链接 | ||
$('#toc li.toclevel-1:last').after('<li class="toclevel-1"><a href="#flowthread"><span class="tocnumber">' + (parseInt($('#toc li.toclevel-1 span.tocnumber:last').text()) + 1) + '</span> <span class="toctext">评论栏</span></a></li>'); | |||
$('#toc li.toclevel-1:last').after('<li class="toclevel-1"><a | |||
} | } | ||
}); | }); |
2021年5月14日 (五) 20:47的最新版本
$(function() {
if ($('#toc')[0] && mw.config.exists('wgFlowThreadConfig')) { //同时存在Flowthread评论栏和目录的页面,在目录添加Flowthread评论栏链接
$('#toc li.toclevel-1:last').after('<li class="toclevel-1"><a href="#flowthread"><span class="tocnumber">' + (parseInt($('#toc li.toclevel-1 span.tocnumber:last').text()) + 1) + '</span> <span class="toctext">评论栏</span></a></li>');
}
});