User:FR30799386/section-strike.js

$('document').ready(function {   function toclimit_check {        var i, selectorstring = 'h2',            tocheading;        var toclimit = $('div[class^="toclimit-"]').attr('class');        if (toclimit) {            tocheading = toclimit.split('-')[1];        } else {            tocheading = '7';        }        for (i = 3; i <= parseInt(tocheading); i++)        {            selectorstring = selectorstring + ', h' + i.toString;        }        return selectorstring;    }    function toc_offset {        var counter = 0,            flag = 0;        $('#toc li:visible')            .each(function { if (!flag) { if ($(this).hasClass('tocsection-1')) { flag++; }                   counter++; }           });        return counter;    }    var c = 0,        toc = toc_offset - 1;    $(toclimit_check)        .not(':first')        .not('[id^="p-"]')        .each(function { c = c + 1; if ($(this).next('div.boilerplate').find('dd').first.text) { $('.tocsection-' + (c - toc).toString).css('text-decoration', 'line-through'); }       }); });