Updates javascript to not rely on removed button