LinkedIn was always a cesspool of spam for me. The quality of posts is improving, so I am paying more attention. After ignoring it for a month, I ended up with countless connection invites. There is no way to manage/decline multiple invites. This console code does the trick (code in reply post).
Comments
for (var i = 0; i < x.length; i++) {
setTimeout(function(idx) {
if (x[idx]) {
x[idx].click();
}
}, 1000 * i, i);
};