Skip to content

Commit

Permalink
close: Replace NavFrame with talkend
Browse files Browse the repository at this point in the history
  • Loading branch information
Xi-Plus committed Sep 5, 2024
1 parent 5c79bbb commit 3f68528
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/twinkleclose.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ Twinkle.close.addLinks = function twinklecloseAddLinks() {
}
});

var selector = ':has(a:only-of-type):not(:has(+ div.NavFrame))';
var selector = ':has(a:only-of-type)';
var titles = $('#bodyContent').find('.mw-heading2' + selector + ':not(:has(+ p + div.mw-heading.mw-heading3)), .mw-heading3' + selector);

titles.each(function(key, current) {
if ($(current).nextUntil('.mw-heading.mw-heading1, .mw-heading.mw-heading2, .mw-heading.mw-heading3, .mw-heading.mw-heading4, .mw-heading.mw-heading5, .mw-heading.mw-heading6', '.talkend').length > 0) {
return;
}
var $pageLink = $(current).find('h2 a, h3 a');
var headlinehref = $pageLink.attr('href');
if (headlinehref === undefined) {
Expand Down

0 comments on commit 3f68528

Please sign in to comment.