But to donate directly, you'd need a common payment service. That means registering (password and two-factor), then either transferring money to your account or authorizing it to draw from your bank account, and finally sending the payment, probably revealing a fair few bit of information about yourself to a website you may like but not necessarily trust. And every step of that process can be hacked, or have connection problems, or you may be on a different computer and need to re-login, and so on.
Paying with electricity lets you skip all that, and HN should be well aware that convenience is worth a lot of money.
In addition to that, with money you must choose how much to donate, and that is a burden on its own. (Does this blogger deserve one buck, or two? I gave two to that article last week, and this dude is almost as good, but I've decided my weekly budget is X €, and I'm almost over it, etc. etc.)
With a JS miner, you pay exactly as long as you keep the tab open, which is a pretty good proxy for how much the page is personally valuable to you.
I don’t think it is. People open links in new tabs for later, and “later” can be quite a while.
And its definitely not true that browsers can actively manage the resources available to inactive tabs, right?
Just because the current set of options doesn't respect these, that is not a reason to discard the idea entirely.
In e.g. Chrome timer events in such a tab are fired only once per second.
There are services such as flattr and patreon that tries to fix this. It is not perfect and the horrendous javascript-infested pages today and click-bait focus doesn't exactly encourage donation.
This is a huge assumption that you are making no attempt to back up.
Without specifying what currency is being mined or the rate of earning it per kw/h you have no way of determining the relative value of those two things.
Especially in the third world, people often don't have credit cards or bank accounts. When they do, transaction costs make microtransactions inefficient.