I'm using the following code to generate an endnote section (instead of having footnotes pop up on every page they are referred to on.
\documentclass{article}
\usepackage{endnotes}
\let\footnote\endnote
\def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}
\let\footnotemark\endnotemark
\begin{document}
\footnote{This is a footnote}
\theendnotes
\end{document}
However, instead of the endnotes having the title "Notes", I would like there to only be a line above the text, just like with standard footnotes. How do I accomplish this?