User:Erutuon/scripts/footnoteCleanup.js: Difference between revisions

Content deleted Content added
oops!!!
edit summary
Line 56:
);
ifvar hasChanged = ( oldContents === contents );
if ( hasChanged )
{
mw.notify("No misplaced footnotes were found.");
Line 62 ⟶ 64:
textbox.val(contents);
$("#wpSummary").val(function()
{
var summary = $(this).html();
var addition = "made sure refs are after punctuation with [[User:Erutuon/footnoteCleanup.js|JavaScript]]";
afterSectionName = summary.match(/^\/\*[^\*]+\*\/\s+(.+)/);
if ( afterSectionName.length > 1 )
{
addition = "; " + addition;
}
if ( hasChanged )
{
$(this).html(content + addition);
}
}
);
}
}