instead of a .com. I made some changes so that it could also work with mathoverflow (feel free to improve on it):
var re = new RegExp('^https://(.*?)\.com/questions/([0-9]+)/');
var group = re.exec(window....