「MediaWiki:Gadget-AddBackToc.js」の版間の差分

Yasusushi (トーク | 投稿記録)
miss
Yasusushi (トーク | 投稿記録)
処理方法を改良
 
(同じ利用者による、間の1版が非表示)
1行目: 1行目:
$('#toctitle~h2,#toctitle~h3,#toctitle~h4,#toctitle~h5,#toctitle~h6').append(' <span class="backtoc">[<a href="#toc">目次に戻る</a>]</span>');
if($('#toc').size()){
    $('.mw-headline').parent('h2,h3,h4,h5,h6').append(' <span class="backtoc">[<a href="#toc">目次に戻る</a>]</span>');
}