To be honest, I don't see the point of a Like button anyhow. There is growing evidence that no one cares what you "like". It's more powerful to share content from a site. Rather than use any JS at all, I just include a share button that' has this basic coding:
You just need to insert the page URL and title dynamically into the [url] and [tile] positions. I tested it myself, and this setup doesn't post the extra #comments part of the URL, even if you've clicked on that.