Content deleted Content added
Show notification if no duplicated links detected; cleanup code and comments |
selector change requested on talk |
||
(One intermediate revision by the same user not shown) | |||
Line 15:
var isVisualEditor = window.___location.href.search("veaction")>0;
// Get the element immediately surrounding the article text.
var $content = isVisualEditor ? $(".ve-ce-documentNode.ve-ce-branchNode") : $($(".mw-parser-output", "#mw-content-text")[0])
// Create a separate div to conatin the lead
$lead = $("<div id='lead'>").prependTo($content);
// Move the elements containing the lead content into this newly-created div
$lead.nextAll().each( function() {
if ( $(this).
// Reached the first heading after the lead.
// Returning false breaks out of the jQuery .each() loop early
|