Content deleted Content added
(bot/CD) |
(bot/CD) |
||
Line 351:
var version = "0.6.0";
var gitAbbrevHash = "
var gitBranch = "main";
var gitDate = "
var gitVersion = "0.6.0+
/**
Line 854:
*/
function sectionHeadingName(element) {
var _a
try {
// Get only the direct text of .mw-headline
// Why? Because DiscussionTools inserts a [subscribe] link in the .mw-headline
// element, which we don't want to include in the section name.
const headlineElement = element.querySelector('.mw-headline');
const headlineDirectText = Array.from((_a = headlineElement === null || headlineElement === void 0 ? void 0 : headlineElement.childNodes) !== null && _a !== void 0 ? _a : [])
.filter(n => n.nodeType === Node.TEXT_NODE)
.reduce((acc, n) => acc + n.textContent, '')
.trim();
return headlineDirectText || (headlineElement === null || headlineElement === void 0 ? void 0 : headlineElement.innerText);
}
catch (e) {
|