User:Polygnotus/Scripts/ReferenceHighlighter.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 16:
// Highlight all the "Jump up to" links in the current reference
citationElement.find('.mw-cite-backlink a[href^="#cite_ref-' + baseId + '"]').each(function() {
$(this).addClass('reference-highlight');
});
// Highlight the clicked element differently
$(clickedElement).closest('sup, li, a').addClass('reference-highlight-clicked');
}
Line 42:
e.preventDefault();
var href = $(this).attr('href');
var baseId = href$(this).splitclosest('-li').attr('id')[1].split('-')[01];
highlightReferences(baseId, this);