4 ms·
This really doesn't require a heavy jQuery dependency. I also don't know why the font related style changes are necessary. You could rewrite this script to be
by bgdam 7y ago
This really doesn't require a heavy jQuery dependency. I also don't know why the font related style changes are necessary.
You could rewrite this script to be as simple as:
const me = document.querySelector("a#me").innerText;
const header = document.querySelector("span.pagetop");
header.innerHTML = header.innerHTML + "<a class='myaddons' href='https://news.ycombinator.com/submitted?id=" + me + "'>| my posts |</a>";
header.innerHTML = header.innerHTML + "<a class='myaddons' href='https://news.ycombinator.com/threads?id=" + me + "'> my cmts |</a>";
Much more efficient and does the job without the heavy jQuery dependency.
I do commend your initiative though, and I'm sure many users will get much use of this.