Filters buttons to only those with the same origin and pathname